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 | 79f97dadfe9b4b561634d202225ba2fa910dc225 (patch) | |
tree | 7bea39a135c7c87b7430d6c071288a05990b9309 /drivers/ata/sata_sil24.c | |
parent | 22183bf569c8600ff414ac25f23134044e0ef453 (diff) |
libata: drop @finish_qc from ata_qc_complete_multiple()
ata_qc_complete_multiple() took @finish_qc and called it on every qc
before completing it. This was to give opportunity to update TF cache
before ata_qc_complete() tries to fill result_tf. Now that result TF
is a separate operation, this is no longer necessary.
Update sata_sil24, which was the only user of this mechanism, such
that it implements its own ops->qc_fill_rtf() and drop @finish_qc from
ata_qc_complete_multiple().
Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'drivers/ata/sata_sil24.c')
-rw-r--r-- | drivers/ata/sata_sil24.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c index fc9d48cd8122..79952f825b40 100644 --- a/drivers/ata/sata_sil24.c +++ b/drivers/ata/sata_sil24.c | |||
@@ -348,6 +348,7 @@ static void sil24_tf_read(struct ata_port *ap, struct ata_taskfile *tf); | |||
348 | static int sil24_qc_defer(struct ata_queued_cmd *qc); | 348 | static int sil24_qc_defer(struct ata_queued_cmd *qc); |
349 | static void sil24_qc_prep(struct ata_queued_cmd *qc); | 349 | static void sil24_qc_prep(struct ata_queued_cmd *qc); |
350 | static unsigned int sil24_qc_issue(struct ata_queued_cmd *qc); | 350 | static unsigned int sil24_qc_issue(struct ata_queued_cmd *qc); |
351 | static bool sil24_qc_fill_rtf(struct ata_queued_cmd *qc); | ||
351 | static void sil24_pmp_attach(struct ata_port *ap); | 352 | static void sil24_pmp_attach(struct ata_port *ap); |
352 | static void sil24_pmp_detach(struct ata_port *ap); | 353 | static void sil24_pmp_detach(struct ata_port *ap); |
353 | static void sil24_freeze(struct ata_port *ap); | 354 | static void sil24_freeze(struct ata_port *ap); |
@@ -407,6 +408,7 @@ static struct ata_port_operations sil24_ops = { | |||
407 | .qc_defer = sil24_qc_defer, | 408 | .qc_defer = sil24_qc_defer, |
408 | .qc_prep = sil24_qc_prep, | 409 | .qc_prep = sil24_qc_prep, |
409 | .qc_issue = sil24_qc_issue, | 410 | .qc_issue = sil24_qc_issue, |
411 | .qc_fill_rtf = sil24_qc_fill_rtf, | ||
410 | 412 | ||
411 | .freeze = sil24_freeze, | 413 | .freeze = sil24_freeze, |
412 | .thaw = sil24_thaw, | 414 | .thaw = sil24_thaw, |
@@ -914,6 +916,12 @@ static unsigned int sil24_qc_issue(struct ata_queued_cmd *qc) | |||
914 | return 0; | 916 | return 0; |
915 | } | 917 | } |
916 | 918 | ||
919 | static bool sil24_qc_fill_rtf(struct ata_queued_cmd *qc) | ||
920 | { | ||
921 | sil24_read_tf(qc->ap, qc->tag, &qc->result_tf); | ||
922 | return true; | ||
923 | } | ||
924 | |||
917 | static void sil24_pmp_attach(struct ata_port *ap) | 925 | static void sil24_pmp_attach(struct ata_port *ap) |
918 | { | 926 | { |
919 | sil24_config_pmp(ap, 1); | 927 | sil24_config_pmp(ap, 1); |
@@ -1098,15 +1106,6 @@ static void sil24_error_intr(struct ata_port *ap) | |||
1098 | } | 1106 | } |
1099 | } | 1107 | } |
1100 | 1108 | ||
1101 | static void sil24_finish_qc(struct ata_queued_cmd *qc) | ||
1102 | { | ||
1103 | struct ata_port *ap = qc->ap; | ||
1104 | struct sil24_port_priv *pp = ap->private_data; | ||
1105 | |||
1106 | if (qc->flags & ATA_QCFLAG_RESULT_TF) | ||
1107 | sil24_read_tf(ap, qc->tag, &pp->tf); | ||
1108 | } | ||
1109 | |||
1110 | static inline void sil24_host_intr(struct ata_port *ap) | 1109 | static inline void sil24_host_intr(struct ata_port *ap) |
1111 | { | 1110 | { |
1112 | void __iomem *port = ap->ioaddr.cmd_addr; | 1111 | void __iomem *port = ap->ioaddr.cmd_addr; |
@@ -1131,7 +1130,7 @@ static inline void sil24_host_intr(struct ata_port *ap) | |||
1131 | } | 1130 | } |
1132 | 1131 | ||
1133 | qc_active = slot_stat & ~HOST_SSTAT_ATTN; | 1132 | qc_active = slot_stat & ~HOST_SSTAT_ATTN; |
1134 | rc = ata_qc_complete_multiple(ap, qc_active, sil24_finish_qc); | 1133 | rc = ata_qc_complete_multiple(ap, qc_active); |
1135 | if (rc > 0) | 1134 | if (rc > 0) |
1136 | return; | 1135 | return; |
1137 | if (rc < 0) { | 1136 | if (rc < 0) { |