aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/libata-scsi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
index 3a4f40b251fb..b007bb409382 100644
--- a/drivers/scsi/libata-scsi.c
+++ b/drivers/scsi/libata-scsi.c
@@ -732,15 +732,17 @@ int ata_scsi_slave_config(struct scsi_device *sdev)
732int ata_scsi_error(struct Scsi_Host *host) 732int ata_scsi_error(struct Scsi_Host *host)
733{ 733{
734 struct ata_port *ap; 734 struct ata_port *ap;
735 unsigned long flags;
735 736
736 DPRINTK("ENTER\n"); 737 DPRINTK("ENTER\n");
737 738
739 ap = (struct ata_port *) &host->hostdata[0];
740
738 spin_lock_irqsave(&ap->host_set->lock, flags); 741 spin_lock_irqsave(&ap->host_set->lock, flags);
739 assert(!(ap->flags & ATA_FLAG_IN_EH)); 742 assert(!(ap->flags & ATA_FLAG_IN_EH));
740 ap->flags |= ATA_FLAG_IN_EH; 743 ap->flags |= ATA_FLAG_IN_EH;
741 spin_unlock_irqrestore(&ap->host_set->lock, flags); 744 spin_unlock_irqrestore(&ap->host_set->lock, flags);
742 745
743 ap = (struct ata_port *) &host->hostdata[0];
744 ap->ops->eng_timeout(ap); 746 ap->ops->eng_timeout(ap);
745 747
746 assert(host->host_failed == 0 && list_empty(&host->eh_cmd_q)); 748 assert(host->host_failed == 0 && list_empty(&host->eh_cmd_q));