summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorAlbert Lee <albertcc@tw.ibm.com>2005-12-05 15:42:17 +0800
committerJeff Garzik <jgarzik@pobox.com>2005-12-06 04:49:23 -0500
commitd8fe452b3e8e9ea6d62a3d116a092999fabae407 (patch)
tree8fdc1ae032ec0a7e223d33fc92c37fc6e36f4a7c /drivers/scsi
parent1c8489840e6b080e810e588423c1b6dd5913cf18 (diff)
downloadblackbird-op-linux-d8fe452b3e8e9ea6d62a3d116a092999fabae407.tar.gz
blackbird-op-linux-d8fe452b3e8e9ea6d62a3d116a092999fabae407.zip
[PATCH] libata: determine the err_mask directly in atapi_packet_task()
- set qc->err_mask directly when we found the error - remove the code to determine err_mask from device status Signed-off-by: Albert Lee <albertcc@tw.ibm.com> ============ Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/libata-core.c13
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)
/* sleep-wait for BSY to clear */
DPRINTK("busy wait\n");
- if (ata_busy_sleep(ap, ATA_TMOUT_CDB_QUICK, ATA_TMOUT_CDB))
- goto err_out_status;
+ if (ata_busy_sleep(ap, ATA_TMOUT_CDB_QUICK, ATA_TMOUT_CDB)) {
+ qc->err_mask |= AC_ERR_ATA_BUS;
+ goto err_out;
+ }
/* make sure DRQ is set */
status = ata_chk_status(ap);
- if ((status & (ATA_BUSY | ATA_DRQ)) != ATA_DRQ)
+ if ((status & (ATA_BUSY | ATA_DRQ)) != ATA_DRQ) {
+ qc->err_mask |= AC_ERR_ATA_BUS;
goto err_out;
+ }
/* send SCSI cdb */
DPRINTK("send cdb\n");
@@ -4121,10 +4125,7 @@ static void atapi_packet_task(void *_data)
return;
-err_out_status:
- status = ata_chk_status(ap);
err_out:
- qc->err_mask |= __ac_err_mask(status);
ata_poll_qc_complete(qc);
}
OpenPOWER on IntegriCloud