diff options
author | Tejun Heo <htejun@gmail.com> | 2007-08-06 18:36:23 +0900 |
---|---|---|
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) | |
download | talos-op-linux-0260731f0187840e272bfa10d3ba0f3e417976f5.tar.gz talos-op-linux-0260731f0187840e272bfa10d3ba0f3e417976f5.zip |
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) /** * optidma_set_mode - mode setup - * @ap: port to set up + * @link: link to set up * * Use the standard setup to tune the chipset and then finalise the * configuration by writing the nibble of extra bits of data into * the chip. */ -static int optidma_set_mode(struct ata_port *ap, struct ata_device **r_failed) +static int optidma_set_mode(struct ata_link *link, struct ata_device **r_failed) { + struct ata_port *ap = link->ap; u8 r; int nybble = 4 * ap->port_no; struct pci_dev *pdev = to_pci_dev(ap->host->dev); - int rc = ata_do_set_mode(ap, r_failed); + int rc = ata_do_set_mode(link, r_failed); if (rc == 0) { pci_read_config_byte(pdev, 0x43, &r); r &= (0x0F << nybble); - r |= (optidma_make_bits43(&ap->link.device[0]) + - (optidma_make_bits43(&ap->link.device[0]) << 2)) << nybble; + r |= (optidma_make_bits43(&link->device[0]) + + (optidma_make_bits43(&link->device[0]) << 2)) << nybble; pci_write_config_byte(pdev, 0x43, r); } return rc; |