From 22183bf569c8600ff414ac25f23134044e0ef453 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Mon, 7 Apr 2008 22:47:20 +0900 Subject: 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 --- drivers/ata/sata_sx4.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/ata/sata_sx4.c') diff --git a/drivers/ata/sata_sx4.c b/drivers/ata/sata_sx4.c index 6107eff731f..ec04b8d3c79 100644 --- a/drivers/ata/sata_sx4.c +++ b/drivers/ata/sata_sx4.c @@ -251,6 +251,7 @@ static struct ata_port_operations pdc_20621_ops = { .phy_reset = pdc_20621_phy_reset, .qc_prep = pdc20621_qc_prep, .qc_issue = pdc20621_qc_issue, + .qc_fill_rtf = ata_sff_qc_fill_rtf, .sff_data_xfer = ata_sff_data_xfer, .eng_timeout = pdc_eng_timeout, .sff_irq_clear = pdc20621_irq_clear, -- cgit v1.2.3