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/pata_optidma.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/pata_optidma.c')
-rw-r--r-- | drivers/ata/pata_optidma.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/ata/pata_optidma.c b/drivers/ata/pata_optidma.c index 39fcba800077..09ef725afd90 100644 --- a/drivers/ata/pata_optidma.c +++ b/drivers/ata/pata_optidma.c | |||
@@ -324,25 +324,26 @@ static u8 optidma_make_bits43(struct ata_device *adev) | |||
324 | 324 | ||
325 | /** | 325 | /** |
326 | * optidma_set_mode - mode setup | 326 | * optidma_set_mode - mode setup |
327 | * @ap: port to set up | 327 | * @link: link to set up |
328 | * | 328 | * |
329 | * Use the standard setup to tune the chipset and then finalise the | 329 | * Use the standard setup to tune the chipset and then finalise the |
330 | * configuration by writing the nibble of extra bits of data into | 330 | * configuration by writing the nibble of extra bits of data into |
331 | * the chip. | 331 | * the chip. |
332 | */ | 332 | */ |
333 | 333 | ||
334 | static int optidma_set_mode(struct ata_port *ap, struct ata_device **r_failed) | 334 | static int optidma_set_mode(struct ata_link *link, struct ata_device **r_failed) |
335 | { | 335 | { |
336 | struct ata_port *ap = link->ap; | ||
336 | u8 r; | 337 | u8 r; |
337 | int nybble = 4 * ap->port_no; | 338 | int nybble = 4 * ap->port_no; |
338 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); | 339 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); |
339 | int rc = ata_do_set_mode(ap, r_failed); | 340 | int rc = ata_do_set_mode(link, r_failed); |
340 | if (rc == 0) { | 341 | if (rc == 0) { |
341 | pci_read_config_byte(pdev, 0x43, &r); | 342 | pci_read_config_byte(pdev, 0x43, &r); |
342 | 343 | ||
343 | r &= (0x0F << nybble); | 344 | r &= (0x0F << nybble); |
344 | r |= (optidma_make_bits43(&ap->link.device[0]) + | 345 | r |= (optidma_make_bits43(&link->device[0]) + |
345 | (optidma_make_bits43(&ap->link.device[0]) << 2)) << nybble; | 346 | (optidma_make_bits43(&link->device[0]) << 2)) << nybble; |
346 | pci_write_config_byte(pdev, 0x43, r); | 347 | pci_write_config_byte(pdev, 0x43, r); |
347 | } | 348 | } |
348 | return rc; | 349 | return rc; |