diff options
author | Tejun Heo <tj@kernel.org> | 2008-07-31 04:02:40 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-09-29 00:22:28 -0400 |
commit | 82ef04fb4c82542b3eda81cca461f0594ce9cd0b (patch) | |
tree | e513df5ad8dc9f7400830bfc8786afb6bec90fb6 /drivers/ata/sata_sil24.c | |
parent | 6ef190cc92e33565accff6a320f0e7d90480bfe7 (diff) |
libata: make SCR access ops per-link
Logically, SCR access ops should take @link; however, there was no
compelling reason to convert all SCR access ops when adding @link
abstraction as there's one-to-one mapping between a port and a non-PMP
link. However, that assumption won't hold anymore with the scheduled
addition of slave link.
Make SCR access ops per-link.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/sata_sil24.c')
-rw-r--r-- | drivers/ata/sata_sil24.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c index 84ffcc26a74..4621807a1a6 100644 --- a/drivers/ata/sata_sil24.c +++ b/drivers/ata/sata_sil24.c | |||
@@ -340,8 +340,8 @@ struct sil24_port_priv { | |||
340 | }; | 340 | }; |
341 | 341 | ||
342 | static void sil24_dev_config(struct ata_device *dev); | 342 | static void sil24_dev_config(struct ata_device *dev); |
343 | static int sil24_scr_read(struct ata_port *ap, unsigned sc_reg, u32 *val); | 343 | static int sil24_scr_read(struct ata_link *link, unsigned sc_reg, u32 *val); |
344 | static int sil24_scr_write(struct ata_port *ap, unsigned sc_reg, u32 val); | 344 | static int sil24_scr_write(struct ata_link *link, unsigned sc_reg, u32 val); |
345 | static int sil24_qc_defer(struct ata_queued_cmd *qc); | 345 | static int sil24_qc_defer(struct ata_queued_cmd *qc); |
346 | static void sil24_qc_prep(struct ata_queued_cmd *qc); | 346 | static void sil24_qc_prep(struct ata_queued_cmd *qc); |
347 | static unsigned int sil24_qc_issue(struct ata_queued_cmd *qc); | 347 | static unsigned int sil24_qc_issue(struct ata_queued_cmd *qc); |
@@ -504,9 +504,9 @@ static int sil24_scr_map[] = { | |||
504 | [SCR_ACTIVE] = 3, | 504 | [SCR_ACTIVE] = 3, |
505 | }; | 505 | }; |
506 | 506 | ||
507 | static int sil24_scr_read(struct ata_port *ap, unsigned sc_reg, u32 *val) | 507 | static int sil24_scr_read(struct ata_link *link, unsigned sc_reg, u32 *val) |
508 | { | 508 | { |
509 | void __iomem *scr_addr = sil24_port_base(ap) + PORT_SCONTROL; | 509 | void __iomem *scr_addr = sil24_port_base(link->ap) + PORT_SCONTROL; |
510 | 510 | ||
511 | if (sc_reg < ARRAY_SIZE(sil24_scr_map)) { | 511 | if (sc_reg < ARRAY_SIZE(sil24_scr_map)) { |
512 | void __iomem *addr; | 512 | void __iomem *addr; |
@@ -517,9 +517,9 @@ static int sil24_scr_read(struct ata_port *ap, unsigned sc_reg, u32 *val) | |||
517 | return -EINVAL; | 517 | return -EINVAL; |
518 | } | 518 | } |
519 | 519 | ||
520 | static int sil24_scr_write(struct ata_port *ap, unsigned sc_reg, u32 val) | 520 | static int sil24_scr_write(struct ata_link *link, unsigned sc_reg, u32 val) |
521 | { | 521 | { |
522 | void __iomem *scr_addr = sil24_port_base(ap) + PORT_SCONTROL; | 522 | void __iomem *scr_addr = sil24_port_base(link->ap) + PORT_SCONTROL; |
523 | 523 | ||
524 | if (sc_reg < ARRAY_SIZE(sil24_scr_map)) { | 524 | if (sc_reg < ARRAY_SIZE(sil24_scr_map)) { |
525 | void __iomem *addr; | 525 | void __iomem *addr; |