aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_qstor.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2008-07-31 04:02:40 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-09-29 00:22:28 -0400
commit82ef04fb4c82542b3eda81cca461f0594ce9cd0b (patch)
treee513df5ad8dc9f7400830bfc8786afb6bec90fb6 /drivers/ata/sata_qstor.c
parent6ef190cc92e33565accff6a320f0e7d90480bfe7 (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_qstor.c')
-rw-r--r--drivers/ata/sata_qstor.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/ata/sata_qstor.c b/drivers/ata/sata_qstor.c
index 1600107047cf..a000c86ac859 100644
--- a/drivers/ata/sata_qstor.c
+++ b/drivers/ata/sata_qstor.c
@@ -111,8 +111,8 @@ struct qs_port_priv {
111 qs_state_t state; 111 qs_state_t state;
112}; 112};
113 113
114static int qs_scr_read(struct ata_port *ap, unsigned int sc_reg, u32 *val); 114static int qs_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val);
115static int qs_scr_write(struct ata_port *ap, unsigned int sc_reg, u32 val); 115static int qs_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val);
116static int qs_ata_init_one(struct pci_dev *pdev, const struct pci_device_id *ent); 116static int qs_ata_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
117static int qs_port_start(struct ata_port *ap); 117static int qs_port_start(struct ata_port *ap);
118static void qs_host_stop(struct ata_host *host); 118static void qs_host_stop(struct ata_host *host);
@@ -242,11 +242,11 @@ static int qs_prereset(struct ata_link *link, unsigned long deadline)
242 return ata_sff_prereset(link, deadline); 242 return ata_sff_prereset(link, deadline);
243} 243}
244 244
245static int qs_scr_read(struct ata_port *ap, unsigned int sc_reg, u32 *val) 245static int qs_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val)
246{ 246{
247 if (sc_reg > SCR_CONTROL) 247 if (sc_reg > SCR_CONTROL)
248 return -EINVAL; 248 return -EINVAL;
249 *val = readl(ap->ioaddr.scr_addr + (sc_reg * 8)); 249 *val = readl(link->ap->ioaddr.scr_addr + (sc_reg * 8));
250 return 0; 250 return 0;
251} 251}
252 252
@@ -256,11 +256,11 @@ static void qs_error_handler(struct ata_port *ap)
256 ata_std_error_handler(ap); 256 ata_std_error_handler(ap);
257} 257}
258 258
259static int qs_scr_write(struct ata_port *ap, unsigned int sc_reg, u32 val) 259static int qs_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val)
260{ 260{
261 if (sc_reg > SCR_CONTROL) 261 if (sc_reg > SCR_CONTROL)
262 return -EINVAL; 262 return -EINVAL;
263 writel(val, ap->ioaddr.scr_addr + (sc_reg * 8)); 263 writel(val, link->ap->ioaddr.scr_addr + (sc_reg * 8));
264 return 0; 264 return 0;
265} 265}
266 266