aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-scsi.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-01-22 23:09:36 -0500
committerJeff Garzik <jgarzik@pobox.com>2006-01-26 22:36:27 -0500
commit9a3d9eb0177eb10500d49cd283b35576082a522d (patch)
tree3a8279ea3f263338cd02918131a36ee716cad1a8 /drivers/scsi/libata-scsi.c
parent11a56d2439259892319df81cf1582687d7e7fde5 (diff)
[PATCH] libata: return AC_ERR_* from issue functions
Return AC_ERR_* mask from issue fuctions instead of 0/-1. This enables things like failing a qc with AC_ERR_HSM when the device doesn't set DRDY when the qc is about to be issued. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/scsi/libata-scsi.c')
-rw-r--r--drivers/scsi/libata-scsi.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
index c496309f691a..95e3c278dd43 100644
--- a/drivers/scsi/libata-scsi.c
+++ b/drivers/scsi/libata-scsi.c
@@ -1322,10 +1322,9 @@ static void ata_scsi_translate(struct ata_port *ap, struct ata_device *dev,
1322 goto early_finish; 1322 goto early_finish;
1323 1323
1324 /* select device, send command to hardware */ 1324 /* select device, send command to hardware */
1325 if (ata_qc_issue(qc)) { 1325 qc->err_mask = ata_qc_issue(qc);
1326 qc->err_mask |= AC_ERR_OTHER; 1326 if (qc->err_mask)
1327 ata_qc_complete(qc); 1327 ata_qc_complete(qc);
1328 }
1329 1328
1330 VPRINTK("EXIT\n"); 1329 VPRINTK("EXIT\n");
1331 return; 1330 return;
@@ -2044,10 +2043,9 @@ static void atapi_request_sense(struct ata_queued_cmd *qc)
2044 2043
2045 qc->complete_fn = atapi_sense_complete; 2044 qc->complete_fn = atapi_sense_complete;
2046 2045
2047 if (ata_qc_issue(qc)) { 2046 qc->err_mask = ata_qc_issue(qc);
2048 qc->err_mask |= AC_ERR_OTHER; 2047 if (qc->err_mask)
2049 ata_qc_complete(qc); 2048 ata_qc_complete(qc);
2050 }
2051 2049
2052 DPRINTK("EXIT\n"); 2050 DPRINTK("EXIT\n");
2053} 2051}