diff options
author | Tejun Heo <htejun@gmail.com> | 2008-04-07 09:47:20 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-04-17 15:44:23 -0400 |
commit | 4c9bf4e799ce06a7378f1196587084802a414c03 (patch) | |
tree | 70a7d3741e756b975468850537f222349143a0be /drivers/ata/sata_sil24.c | |
parent | 79f97dadfe9b4b561634d202225ba2fa910dc225 (diff) |
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 <htejun@gmail.com>
Diffstat (limited to 'drivers/ata/sata_sil24.c')
-rw-r--r-- | drivers/ata/sata_sil24.c | 8 |
1 files changed, 0 insertions, 8 deletions
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); | |||
344 | static u8 sil24_check_status(struct ata_port *ap); | 344 | static u8 sil24_check_status(struct ata_port *ap); |
345 | static int sil24_scr_read(struct ata_port *ap, unsigned sc_reg, u32 *val); | 345 | static int sil24_scr_read(struct ata_port *ap, unsigned sc_reg, u32 *val); |
346 | static int sil24_scr_write(struct ata_port *ap, unsigned sc_reg, u32 val); | 346 | static int sil24_scr_write(struct ata_port *ap, unsigned sc_reg, u32 val); |
347 | static void sil24_tf_read(struct ata_port *ap, struct ata_taskfile *tf); | ||
348 | static int sil24_qc_defer(struct ata_queued_cmd *qc); | 347 | static int sil24_qc_defer(struct ata_queued_cmd *qc); |
349 | static void sil24_qc_prep(struct ata_queued_cmd *qc); | 348 | static void sil24_qc_prep(struct ata_queued_cmd *qc); |
350 | static unsigned int sil24_qc_issue(struct ata_queued_cmd *qc); | 349 | static unsigned int sil24_qc_issue(struct ata_queued_cmd *qc); |
@@ -404,7 +403,6 @@ static struct ata_port_operations sil24_ops = { | |||
404 | 403 | ||
405 | .sff_check_status = sil24_check_status, | 404 | .sff_check_status = sil24_check_status, |
406 | .sff_check_altstatus = sil24_check_status, | 405 | .sff_check_altstatus = sil24_check_status, |
407 | .sff_tf_read = sil24_tf_read, | ||
408 | .qc_defer = sil24_qc_defer, | 406 | .qc_defer = sil24_qc_defer, |
409 | .qc_prep = sil24_qc_prep, | 407 | .qc_prep = sil24_qc_prep, |
410 | .qc_issue = sil24_qc_issue, | 408 | .qc_issue = sil24_qc_issue, |
@@ -533,12 +531,6 @@ static int sil24_scr_write(struct ata_port *ap, unsigned sc_reg, u32 val) | |||
533 | return -EINVAL; | 531 | return -EINVAL; |
534 | } | 532 | } |
535 | 533 | ||
536 | static void sil24_tf_read(struct ata_port *ap, struct ata_taskfile *tf) | ||
537 | { | ||
538 | struct sil24_port_priv *pp = ap->private_data; | ||
539 | *tf = pp->tf; | ||
540 | } | ||
541 | |||
542 | static void sil24_config_port(struct ata_port *ap) | 534 | static void sil24_config_port(struct ata_port *ap) |
543 | { | 535 | { |
544 | void __iomem *port = ap->ioaddr.cmd_addr; | 536 | void __iomem *port = ap->ioaddr.cmd_addr; |