diff options
author | Tejun Heo <htejun@gmail.com> | 2006-03-31 06:41:11 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-03-31 10:14:42 -0500 |
commit | 8e0e694a3a48212bfe29a9ad3cd592bf68dfec81 (patch) | |
tree | 82f2b114160c8f1a6537c471fea7b41e50a80814 /drivers/scsi/libata-scsi.c | |
parent | e4a70e76add280db6068426716a9b2a74099144f (diff) |
[PATCH] libata: make ata_qc_issue complete failed qcs
There is no reason for the issuer to diddle with a failed qc as the
issuer has complete control over when a qc gets freed (usually in
->complete_fn). Make ata_qc_issue() responsible for completing qcs
which failed to issue.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/scsi/libata-scsi.c')
-rw-r--r-- | drivers/scsi/libata-scsi.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c index 628191bfd990..53f5b0d9161c 100644 --- a/drivers/scsi/libata-scsi.c +++ b/drivers/scsi/libata-scsi.c | |||
@@ -1431,9 +1431,7 @@ static void ata_scsi_translate(struct ata_port *ap, struct ata_device *dev, | |||
1431 | goto early_finish; | 1431 | goto early_finish; |
1432 | 1432 | ||
1433 | /* select device, send command to hardware */ | 1433 | /* select device, send command to hardware */ |
1434 | qc->err_mask = ata_qc_issue(qc); | 1434 | ata_qc_issue(qc); |
1435 | if (qc->err_mask) | ||
1436 | ata_qc_complete(qc); | ||
1437 | 1435 | ||
1438 | VPRINTK("EXIT\n"); | 1436 | VPRINTK("EXIT\n"); |
1439 | return; | 1437 | return; |
@@ -2199,9 +2197,7 @@ static void atapi_request_sense(struct ata_queued_cmd *qc) | |||
2199 | 2197 | ||
2200 | qc->complete_fn = atapi_sense_complete; | 2198 | qc->complete_fn = atapi_sense_complete; |
2201 | 2199 | ||
2202 | qc->err_mask = ata_qc_issue(qc); | 2200 | ata_qc_issue(qc); |
2203 | if (qc->err_mask) | ||
2204 | ata_qc_complete(qc); | ||
2205 | 2201 | ||
2206 | DPRINTK("EXIT\n"); | 2202 | DPRINTK("EXIT\n"); |
2207 | } | 2203 | } |