diff options
author | Tejun Heo <htejun@gmail.com> | 2007-08-06 05:36:23 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-10-12 14:55:31 -0400 |
commit | 0260731f0187840e272bfa10d3ba0f3e417976f5 (patch) | |
tree | d39219275e89ce782f3151b5ac47726957a81e24 /drivers/ata/sata_sil.c | |
parent | cc0680a580b5be81a1ca321b58f8e9b80b5c1052 (diff) |
libata-link: linkify config/EH related functions
Make the following functions deal with ata_link instead of ata_port.
* ata_set_mode()
* ata_eh_autopsy() and related functions
* ata_eh_report() and related functions
* suspend/resume related functions
* ata_eh_recover() and related functions
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/sata_sil.c')
-rw-r--r-- | drivers/ata/sata_sil.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c index 4c9295a49a49..5cd3eb83e4ad 100644 --- a/drivers/ata/sata_sil.c +++ b/drivers/ata/sata_sil.c | |||
@@ -117,7 +117,7 @@ static int sil_pci_device_resume(struct pci_dev *pdev); | |||
117 | static void sil_dev_config(struct ata_device *dev); | 117 | static void sil_dev_config(struct ata_device *dev); |
118 | static int sil_scr_read(struct ata_port *ap, unsigned int sc_reg, u32 *val); | 118 | static int sil_scr_read(struct ata_port *ap, unsigned int sc_reg, u32 *val); |
119 | static int sil_scr_write(struct ata_port *ap, unsigned int sc_reg, u32 val); | 119 | static int sil_scr_write(struct ata_port *ap, unsigned int sc_reg, u32 val); |
120 | static int sil_set_mode (struct ata_port *ap, struct ata_device **r_failed); | 120 | static int sil_set_mode(struct ata_link *link, struct ata_device **r_failed); |
121 | static void sil_freeze(struct ata_port *ap); | 121 | static void sil_freeze(struct ata_port *ap); |
122 | static void sil_thaw(struct ata_port *ap); | 122 | static void sil_thaw(struct ata_port *ap); |
123 | 123 | ||
@@ -290,27 +290,27 @@ static unsigned char sil_get_device_cache_line(struct pci_dev *pdev) | |||
290 | 290 | ||
291 | /** | 291 | /** |
292 | * sil_set_mode - wrap set_mode functions | 292 | * sil_set_mode - wrap set_mode functions |
293 | * @ap: port to set up | 293 | * @link: link to set up |
294 | * @r_failed: returned device when we fail | 294 | * @r_failed: returned device when we fail |
295 | * | 295 | * |
296 | * Wrap the libata method for device setup as after the setup we need | 296 | * Wrap the libata method for device setup as after the setup we need |
297 | * to inspect the results and do some configuration work | 297 | * to inspect the results and do some configuration work |
298 | */ | 298 | */ |
299 | 299 | ||
300 | static int sil_set_mode (struct ata_port *ap, struct ata_device **r_failed) | 300 | static int sil_set_mode(struct ata_link *link, struct ata_device **r_failed) |
301 | { | 301 | { |
302 | struct ata_host *host = ap->host; | 302 | struct ata_port *ap = link->ap; |
303 | struct ata_device *dev; | 303 | void __iomem *mmio_base = ap->host->iomap[SIL_MMIO_BAR]; |
304 | void __iomem *mmio_base = host->iomap[SIL_MMIO_BAR]; | ||
305 | void __iomem *addr = mmio_base + sil_port[ap->port_no].xfer_mode; | 304 | void __iomem *addr = mmio_base + sil_port[ap->port_no].xfer_mode; |
305 | struct ata_device *dev; | ||
306 | u32 tmp, dev_mode[2] = { }; | 306 | u32 tmp, dev_mode[2] = { }; |
307 | int rc; | 307 | int rc; |
308 | 308 | ||
309 | rc = ata_do_set_mode(ap, r_failed); | 309 | rc = ata_do_set_mode(link, r_failed); |
310 | if (rc) | 310 | if (rc) |
311 | return rc; | 311 | return rc; |
312 | 312 | ||
313 | ata_link_for_each_dev(dev, &ap->link) { | 313 | ata_link_for_each_dev(dev, link) { |
314 | if (!ata_dev_enabled(dev)) | 314 | if (!ata_dev_enabled(dev)) |
315 | dev_mode[dev->devno] = 0; /* PIO0/1/2 */ | 315 | dev_mode[dev->devno] = 0; /* PIO0/1/2 */ |
316 | else if (dev->flags & ATA_DFLAG_PIO) | 316 | else if (dev->flags & ATA_DFLAG_PIO) |