diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/libata-core.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index f1942545a20d..a74b4071a662 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -1144,7 +1144,7 @@ retry: | |||
1144 | * ATA software reset (SRST, the default) does not appear | 1144 | * ATA software reset (SRST, the default) does not appear |
1145 | * to have this problem. | 1145 | * to have this problem. |
1146 | */ | 1146 | */ |
1147 | if ((using_edd) && (qc->tf.command == ATA_CMD_ID_ATA)) { | 1147 | if ((using_edd) && (dev->class == ATA_DEV_ATA)) { |
1148 | u8 err = qc->tf.feature; | 1148 | u8 err = qc->tf.feature; |
1149 | if (err & ATA_ABORTED) { | 1149 | if (err & ATA_ABORTED) { |
1150 | dev->class = ATA_DEV_ATAPI; | 1150 | dev->class = ATA_DEV_ATAPI; |
@@ -2747,7 +2747,6 @@ static unsigned long ata_pio_poll(struct ata_port *ap) | |||
2747 | u8 status; | 2747 | u8 status; |
2748 | unsigned int poll_state = HSM_ST_UNKNOWN; | 2748 | unsigned int poll_state = HSM_ST_UNKNOWN; |
2749 | unsigned int reg_state = HSM_ST_UNKNOWN; | 2749 | unsigned int reg_state = HSM_ST_UNKNOWN; |
2750 | const unsigned int tmout_state = HSM_ST_TMOUT; | ||
2751 | 2750 | ||
2752 | switch (ap->hsm_task_state) { | 2751 | switch (ap->hsm_task_state) { |
2753 | case HSM_ST: | 2752 | case HSM_ST: |
@@ -2768,7 +2767,7 @@ static unsigned long ata_pio_poll(struct ata_port *ap) | |||
2768 | status = ata_chk_status(ap); | 2767 | status = ata_chk_status(ap); |
2769 | if (status & ATA_BUSY) { | 2768 | if (status & ATA_BUSY) { |
2770 | if (time_after(jiffies, ap->pio_task_timeout)) { | 2769 | if (time_after(jiffies, ap->pio_task_timeout)) { |
2771 | ap->hsm_task_state = tmout_state; | 2770 | ap->hsm_task_state = HSM_ST_TMOUT; |
2772 | return 0; | 2771 | return 0; |
2773 | } | 2772 | } |
2774 | ap->hsm_task_state = poll_state; | 2773 | ap->hsm_task_state = poll_state; |