aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2008-04-07 09:47:20 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-04-17 15:44:23 -0400
commit22183bf569c8600ff414ac25f23134044e0ef453 (patch)
tree1dea79cdbe439637477e1c4214b600b6823cb866 /drivers/scsi
parent305d2a1ab137d11d573319c315748a87060fe82d (diff)
libata: add qc_fill_rtf port operation
On command completion, ata_qc_complete() directly called ops->tf_read to fill qc->result_tf. This patch adds ops->qc_fill_rtf to replace hardcoded ops->tf_read usage. ata_sff_qc_fill_rtf() which uses ops->tf_read to fill result_tf is implemented and set in ata_base_port_ops and other ops tables which don't inherit from ata_base_port_ops, so this patch doesn't introduce any behavior change. ops->qc_fill_rtf() is similar to ops->sff_tf_read() but can only be called when a command finishes. As some non-SFF controllers don't have TF registers defined unless they're associated with in-flight commands, this limited operation makes life easier for those drivers and help lifting SFF assumptions from libata core layer. Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/ipr.c1
-rw-r--r--drivers/scsi/libsas/sas_ata.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index 5bddae19d1fb..2ecd32991522 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -5280,6 +5280,7 @@ static struct ata_port_operations ipr_sata_ops = {
5280 .sff_tf_read = ipr_tf_read, 5280 .sff_tf_read = ipr_tf_read,
5281 .qc_prep = ata_noop_qc_prep, 5281 .qc_prep = ata_noop_qc_prep,
5282 .qc_issue = ipr_qc_issue, 5282 .qc_issue = ipr_qc_issue,
5283 .qc_fill_rtf = ata_sff_qc_fill_rtf,
5283 .port_start = ata_sas_port_start, 5284 .port_start = ata_sas_port_start,
5284 .port_stop = ata_sas_port_stop 5285 .port_stop = ata_sas_port_stop
5285}; 5286};
diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c
index a1664b87927a..2ec255839dcd 100644
--- a/drivers/scsi/libsas/sas_ata.c
+++ b/drivers/scsi/libsas/sas_ata.c
@@ -356,6 +356,7 @@ static struct ata_port_operations sas_sata_ops = {
356 .sff_tf_read = sas_ata_tf_read, 356 .sff_tf_read = sas_ata_tf_read,
357 .qc_prep = ata_noop_qc_prep, 357 .qc_prep = ata_noop_qc_prep,
358 .qc_issue = sas_ata_qc_issue, 358 .qc_issue = sas_ata_qc_issue,
359 .qc_fill_rtf = ata_sff_qc_fill_rtf,
359 .port_start = ata_sas_port_start, 360 .port_start = ata_sas_port_start,
360 .port_stop = ata_sas_port_stop, 361 .port_stop = ata_sas_port_stop,
361 .scr_read = sas_ata_scr_read, 362 .scr_read = sas_ata_scr_read,