]> err.no Git - linux-2.6/blobdiff - drivers/ata/pata_amd.c
libata-link: linkify reset
[linux-2.6] / drivers / ata / pata_amd.c
index b09facad63e17a0f4dac7e64f854b39592899cb0..d0cebe16a8ee2baf9a3178f01fa5d67d4a96afc4 100644 (file)
@@ -25,7 +25,7 @@
 #include <linux/libata.h>
 
 #define DRV_NAME "pata_amd"
-#define DRV_VERSION "0.3.8"
+#define DRV_VERSION "0.3.9"
 
 /**
  *     timing_setup            -       shared timing computation and load
@@ -119,27 +119,28 @@ static void timing_setup(struct ata_port *ap, struct ata_device *adev, int offse
 }
 
 /**
- *     amd_probe_init          -       perform reset handling
- *     @ap: ATA port
+ *     amd_pre_reset           -       perform reset handling
+ *     @link: ATA link
  *     @deadline: deadline jiffies for the operation
  *
  *     Reset sequence checking enable bits to see which ports are
  *     active.
  */
 
-static int amd_pre_reset(struct ata_port *ap, unsigned long deadline)
+static int amd_pre_reset(struct ata_link *link, unsigned long deadline)
 {
        static const struct pci_bits amd_enable_bits[] = {
                { 0x40, 1, 0x02, 0x02 },
                { 0x40, 1, 0x01, 0x01 }
        };
 
+       struct ata_port *ap = link->ap;
        struct pci_dev *pdev = to_pci_dev(ap->host->dev);
 
        if (!pci_test_config_bits(pdev, &amd_enable_bits[ap->port_no]))
                return -ENOENT;
 
-       return ata_std_prereset(ap, deadline);
+       return ata_std_prereset(link, deadline);
 }
 
 static void amd_error_handler(struct ata_port *ap)
@@ -221,25 +222,26 @@ static void amd133_set_dmamode(struct ata_port *ap, struct ata_device *adev)
 
 /**
  *     nv_probe_init   -       cable detection
- *     @ap: ATA port
+ *     @lin: ATA link
  *
  *     Perform cable detection. The BIOS stores this in PCI config
  *     space for us.
  */
 
-static int nv_pre_reset(struct ata_port *ap, unsigned long deadline)
+static int nv_pre_reset(struct ata_link *link, unsigned long deadline)
 {
        static const struct pci_bits nv_enable_bits[] = {
                { 0x50, 1, 0x02, 0x02 },
                { 0x50, 1, 0x01, 0x01 }
        };
 
+       struct ata_port *ap = link->ap;
        struct pci_dev *pdev = to_pci_dev(ap->host->dev);
 
        if (!pci_test_config_bits(pdev, &nv_enable_bits[ap->port_no]))
                return -ENOENT;
 
-       return ata_std_prereset(ap, deadline);
+       return ata_std_prereset(link, deadline);
 }
 
 static void nv_error_handler(struct ata_port *ap)