From 4c9bf4e799ce06a7378f1196587084802a414c03 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Mon, 7 Apr 2008 22:47:20 +0900 Subject: libata: replace tf_read with qc_fill_rtf for non-SFF drivers Now that all SFF stuff is separated out of core layer, core layer doesn't call ops->tf_read directly. It gets called only via ops->qc_fill_rtf() for non-SFF drivers. This patch directly implements private ops->qc_fill_rtf() for non-SFF controllers and kill ops->tf_read(). This is much cleaner for non-SFF controllers as some of them have to cache SFF register values in private data structure and report the cached values via ops->tf_read(). Also, ops->tf_read() gets nasty for controllers which don't have clear notion of TF registers when operation is not in progress. As this change makes default ops->qc_fill_rtf unnecessary, move ata_sff_qc_fill_rtf() form ata_base_port_ops to ata_sff_port_ops where it belongs. Signed-off-by: Tejun Heo --- drivers/ata/sata_sil24.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'drivers/ata/sata_sil24.c') diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c index 79952f825b40..51a7c06803df 100644 --- a/drivers/ata/sata_sil24.c +++ b/drivers/ata/sata_sil24.c @@ -344,7 +344,6 @@ static void sil24_dev_config(struct ata_device *dev); static u8 sil24_check_status(struct ata_port *ap); static int sil24_scr_read(struct ata_port *ap, unsigned sc_reg, u32 *val); static int sil24_scr_write(struct ata_port *ap, unsigned sc_reg, u32 val); -static void sil24_tf_read(struct ata_port *ap, struct ata_taskfile *tf); static int sil24_qc_defer(struct ata_queued_cmd *qc); static void sil24_qc_prep(struct ata_queued_cmd *qc); static unsigned int sil24_qc_issue(struct ata_queued_cmd *qc); @@ -404,7 +403,6 @@ static struct ata_port_operations sil24_ops = { .sff_check_status = sil24_check_status, .sff_check_altstatus = sil24_check_status, - .sff_tf_read = sil24_tf_read, .qc_defer = sil24_qc_defer, .qc_prep = sil24_qc_prep, .qc_issue = sil24_qc_issue, @@ -533,12 +531,6 @@ static int sil24_scr_write(struct ata_port *ap, unsigned sc_reg, u32 val) return -EINVAL; } -static void sil24_tf_read(struct ata_port *ap, struct ata_taskfile *tf) -{ - struct sil24_port_priv *pp = ap->private_data; - *tf = pp->tf; -} - static void sil24_config_port(struct ata_port *ap) { void __iomem *port = ap->ioaddr.cmd_addr; -- cgit v1.2.3