]> err.no Git - linux-2.6/blobdiff - drivers/ata/pata_amd.c
libata: reimplement ata_acpi_cbl_80wire() using ata_acpi_gtm_xfermask()
[linux-2.6] / drivers / ata / pata_amd.c
index b1db7ff8edd1d7329a7bb890cab155fe98c4bc96..e71125a4bd9bab7d91900613661a461bd4c9d7b7 100644 (file)
@@ -25,7 +25,7 @@
 #include <linux/libata.h>
 
 #define DRV_NAME "pata_amd"
-#define DRV_VERSION "0.3.9"
+#define DRV_VERSION "0.3.10"
 
 /**
  *     timing_setup            -       shared timing computation and load
@@ -115,7 +115,8 @@ static void timing_setup(struct ata_port *ap, struct ata_device *adev, int offse
        }
 
        /* UDMA timing */
-       pci_write_config_byte(pdev, offset + 0x10 + (3 - dn), t);
+       if (at.udma)
+               pci_write_config_byte(pdev, offset + 0x10 + (3 - dn), t);
 }
 
 /**
@@ -271,7 +272,8 @@ static int nv_cable_detect(struct ata_port *ap)
        if ((udma & 0xC4) == 0xC4 || (udma & 0xC400) == 0xC400)
                cbl = ATA_CBL_PATA80;
        /* And a triple check across suspend/resume with ACPI around */
-       if (ata_acpi_cbl_80wire(ap))
+       if (ata_acpi_init_gtm(ap) &&
+           ata_acpi_cbl_80wire(ap, ata_acpi_init_gtm(ap)))
                cbl = ATA_CBL_PATA80;
        return cbl;
 }
@@ -361,7 +363,7 @@ static struct ata_port_operations amd33_port_ops = {
        .irq_clear      = ata_bmdma_irq_clear,
        .irq_on         = ata_irq_on,
 
-       .port_start     = ata_port_start,
+       .port_start     = ata_sff_port_start,
 };
 
 static struct ata_port_operations amd66_port_ops = {
@@ -394,7 +396,7 @@ static struct ata_port_operations amd66_port_ops = {
        .irq_clear      = ata_bmdma_irq_clear,
        .irq_on         = ata_irq_on,
 
-       .port_start     = ata_port_start,
+       .port_start     = ata_sff_port_start,
 };
 
 static struct ata_port_operations amd100_port_ops = {
@@ -427,7 +429,7 @@ static struct ata_port_operations amd100_port_ops = {
        .irq_clear      = ata_bmdma_irq_clear,
        .irq_on         = ata_irq_on,
 
-       .port_start     = ata_port_start,
+       .port_start     = ata_sff_port_start,
 };
 
 static struct ata_port_operations amd133_port_ops = {
@@ -460,7 +462,7 @@ static struct ata_port_operations amd133_port_ops = {
        .irq_clear      = ata_bmdma_irq_clear,
        .irq_on         = ata_irq_on,
 
-       .port_start     = ata_port_start,
+       .port_start     = ata_sff_port_start,
 };
 
 static struct ata_port_operations nv100_port_ops = {
@@ -493,7 +495,7 @@ static struct ata_port_operations nv100_port_ops = {
        .irq_clear      = ata_bmdma_irq_clear,
        .irq_on         = ata_irq_on,
 
-       .port_start     = ata_port_start,
+       .port_start     = ata_sff_port_start,
 };
 
 static struct ata_port_operations nv133_port_ops = {
@@ -526,7 +528,7 @@ static struct ata_port_operations nv133_port_ops = {
        .irq_clear      = ata_bmdma_irq_clear,
        .irq_on         = ata_irq_on,
 
-       .port_start     = ata_port_start,
+       .port_start     = ata_sff_port_start,
 };
 
 static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)