diff options
author | Tejun Heo <htejun@gmail.com> | 2006-03-31 13:36:47 +0200 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-03-31 17:14:42 +0200 |
commit | e4a70e76add280db6068426716a9b2a74099144f (patch) | |
tree | b978d7da736590fe0603e7a88a7a9b20cc2a36b1 /drivers/scsi | |
parent | [PATCH] ata_piix: fix ich6/m_map_db (diff) | |
download | linux-e4a70e76add280db6068426716a9b2a74099144f.tar.xz linux-e4a70e76add280db6068426716a9b2a74099144f.zip |
[PATCH] libata: fix ata_qc_issue failure path
On sg_err failure path, ata_qc_issue() doesn't mark the qc active
before returning. This triggers WARN_ON() in __ata_qc_complete() when
the qc gets completed. This patch moves ap->active_tag and
QCFLAG_ACTIVE setting to the top of the function.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/libata-core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 21b0ed583b8a..eb4df01d9fa0 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -4006,6 +4006,9 @@ unsigned int ata_qc_issue(struct ata_queued_cmd *qc) { struct ata_port *ap = qc->ap; + qc->ap->active_tag = qc->tag; + qc->flags |= ATA_QCFLAG_ACTIVE; + if (ata_should_dma_map(qc)) { if (qc->flags & ATA_QCFLAG_SG) { if (ata_sg_setup(qc)) @@ -4020,9 +4023,6 @@ unsigned int ata_qc_issue(struct ata_queued_cmd *qc) ap->ops->qc_prep(qc); - qc->ap->active_tag = qc->tag; - qc->flags |= ATA_QCFLAG_ACTIVE; - return ap->ops->qc_issue(qc); sg_err: |