aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-core.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-05-15 07:57:40 -0400
committerTejun Heo <htejun@gmail.com>2006-05-15 07:57:40 -0400
commite61e067227bc76b4d9411a50d735c9d87f27b0e2 (patch)
tree007d22539b24aa6ae8e258af6e22a4187490a4c1 /drivers/scsi/libata-core.c
parent96bd39ec295e49443c8b0c25a6b69fdace18780f (diff)
[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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 19ae3fa1cfcb..51cb9ca5519c 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)
955{ 955{
956 struct completion *waiting = qc->private_data; 956 struct completion *waiting = qc->private_data;
957 957
958 qc->ap->ops->tf_read(qc->ap, &qc->tf);
959 complete(waiting); 958 complete(waiting);
960} 959}
961 960
@@ -997,6 +996,7 @@ unsigned ata_exec_internal(struct ata_port *ap, struct ata_device *dev,
997 qc->tf = *tf; 996 qc->tf = *tf;
998 if (cdb) 997 if (cdb)
999 memcpy(qc->cdb, cdb, ATAPI_CDB_LEN); 998 memcpy(qc->cdb, cdb, ATAPI_CDB_LEN);
999 qc->flags |= ATA_QCFLAG_RESULT_TF;
1000 qc->dma_dir = dma_dir; 1000 qc->dma_dir = dma_dir;
1001 if (dma_dir != DMA_NONE) { 1001 if (dma_dir != DMA_NONE) {
1002 ata_sg_init_one(qc, buf, buflen); 1002 ata_sg_init_one(qc, buf, buflen);
@@ -1034,7 +1034,7 @@ unsigned ata_exec_internal(struct ata_port *ap, struct ata_device *dev,
1034 /* finish up */ 1034 /* finish up */
1035 spin_lock_irqsave(&ap->host_set->lock, flags); 1035 spin_lock_irqsave(&ap->host_set->lock, flags);
1036 1036
1037 *tf = qc->tf; 1037 *tf = qc->result_tf;
1038 err_mask = qc->err_mask; 1038 err_mask = qc->err_mask;
1039 1039
1040 ata_qc_free(qc); 1040 ata_qc_free(qc);