diff options
author | Tejun Heo <htejun@gmail.com> | 2006-05-15 11:57:40 (GMT) |
---|---|---|
committer | Tejun Heo <htejun@gmail.com> | 2006-05-15 11:57:40 (GMT) |
commit | e61e067227bc76b4d9411a50d735c9d87f27b0e2 (patch) | |
tree | 007d22539b24aa6ae8e258af6e22a4187490a4c1 /drivers/scsi/libata-core.c | |
parent | 96bd39ec295e49443c8b0c25a6b69fdace18780f (diff) | |
download | linux-e61e067227bc76b4d9411a50d735c9d87f27b0e2.tar.xz |
[PATCH] libata: implement qc->result_tf
Add qc->result_tf and ATA_QCFLAG_RESULT_TF. This moves the
responsibility of loading result TF from post-compltion path to qc
execution path. qc->result_tf is loaded if explicitly requested or
the qc failsa. This allows more efficient completion implementation
and correct handling of result TF for controllers which don't have
global TF representation such as sil3124/32.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'drivers/scsi/libata-core.c')
-rw-r--r-- | drivers/scsi/libata-core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 19ae3fa..51cb9ca 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -955,7 +955,6 @@ void ata_qc_complete_internal(struct ata_queued_cmd *qc) { struct completion *waiting = qc->private_data; - qc->ap->ops->tf_read(qc->ap, &qc->tf); complete(waiting); } @@ -997,6 +996,7 @@ unsigned ata_exec_internal(struct ata_port *ap, struct ata_device *dev, qc->tf = *tf; if (cdb) memcpy(qc->cdb, cdb, ATAPI_CDB_LEN); + qc->flags |= ATA_QCFLAG_RESULT_TF; qc->dma_dir = dma_dir; if (dma_dir != DMA_NONE) { ata_sg_init_one(qc, buf, buflen); @@ -1034,7 +1034,7 @@ unsigned ata_exec_internal(struct ata_port *ap, struct ata_device *dev, /* finish up */ spin_lock_irqsave(&ap->host_set->lock, flags); - *tf = qc->tf; + *tf = qc->result_tf; err_mask = qc->err_mask; ata_qc_free(qc); |