diff options
-rw-r--r-- | drivers/scsi/libata-core.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index cc003f2c6d9b..b3aedb033465 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -4083,13 +4083,17 @@ static void atapi_packet_task(void *_data) | |||
4083 | 4083 | ||
4084 | /* sleep-wait for BSY to clear */ | 4084 | /* sleep-wait for BSY to clear */ |
4085 | DPRINTK("busy wait\n"); | 4085 | DPRINTK("busy wait\n"); |
4086 | if (ata_busy_sleep(ap, ATA_TMOUT_CDB_QUICK, ATA_TMOUT_CDB)) | 4086 | if (ata_busy_sleep(ap, ATA_TMOUT_CDB_QUICK, ATA_TMOUT_CDB)) { |
4087 | goto err_out_status; | 4087 | qc->err_mask |= AC_ERR_ATA_BUS; |
4088 | goto err_out; | ||
4089 | } | ||
4088 | 4090 | ||
4089 | /* make sure DRQ is set */ | 4091 | /* make sure DRQ is set */ |
4090 | status = ata_chk_status(ap); | 4092 | status = ata_chk_status(ap); |
4091 | if ((status & (ATA_BUSY | ATA_DRQ)) != ATA_DRQ) | 4093 | if ((status & (ATA_BUSY | ATA_DRQ)) != ATA_DRQ) { |
4094 | qc->err_mask |= AC_ERR_ATA_BUS; | ||
4092 | goto err_out; | 4095 | goto err_out; |
4096 | } | ||
4093 | 4097 | ||
4094 | /* send SCSI cdb */ | 4098 | /* send SCSI cdb */ |
4095 | DPRINTK("send cdb\n"); | 4099 | DPRINTK("send cdb\n"); |
@@ -4121,10 +4125,7 @@ static void atapi_packet_task(void *_data) | |||
4121 | 4125 | ||
4122 | return; | 4126 | return; |
4123 | 4127 | ||
4124 | err_out_status: | ||
4125 | status = ata_chk_status(ap); | ||
4126 | err_out: | 4128 | err_out: |
4127 | qc->err_mask |= __ac_err_mask(status); | ||
4128 | ata_poll_qc_complete(qc); | 4129 | ata_poll_qc_complete(qc); |
4129 | } | 4130 | } |
4130 | 4131 | ||