]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ata/pata_pdc202xx_old.c
[BNX2]: Fix default WoL setting.
[linux-2.6-omap-h63xx.git] / drivers / ata / pata_pdc202xx_old.c
index ee636beb05e132f7da4ca127d569702c5eb4d6fc..92447bed5e7716f615b423672bf0e52e524ce1f9 100644 (file)
@@ -31,8 +31,8 @@ static int pdc2026x_cable_detect(struct ata_port *ap)
 
        pci_read_config_word(pdev, 0x50, &cis);
        if (cis & (1 << (10 + ap->port_no)))
-               return ATA_CBL_PATA80;
-       return ATA_CBL_PATA40;
+               return ATA_CBL_PATA40;
+       return ATA_CBL_PATA80;
 }
 
 /**
@@ -244,10 +244,6 @@ static struct scsi_host_template pdc202xx_sht = {
        .slave_configure        = ata_scsi_slave_config,
        .slave_destroy          = ata_scsi_slave_destroy,
        .bios_param             = ata_std_bios_param,
-#ifdef CONFIG_PM
-       .resume                 = ata_scsi_device_resume,
-       .suspend                = ata_scsi_device_suspend,
-#endif
 };
 
 static struct ata_port_operations pdc2024x_port_ops = {
@@ -321,10 +317,10 @@ static struct ata_port_operations pdc2026x_port_ops = {
 
 static int pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
-       static struct ata_port_info info[3] = {
+       static const struct ata_port_info info[3] = {
                {
                        .sht = &pdc202xx_sht,
-                       .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
+                       .flags = ATA_FLAG_SLAVE_POSS,
                        .pio_mask = 0x1f,
                        .mwdma_mask = 0x07,
                        .udma_mask = ATA_UDMA2,
@@ -332,7 +328,7 @@ static int pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id
                },
                {
                        .sht = &pdc202xx_sht,
-                       .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
+                       .flags = ATA_FLAG_SLAVE_POSS,
                        .pio_mask = 0x1f,
                        .mwdma_mask = 0x07,
                        .udma_mask = ATA_UDMA4,
@@ -340,7 +336,7 @@ static int pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id
                },
                {
                        .sht = &pdc202xx_sht,
-                       .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
+                       .flags = ATA_FLAG_SLAVE_POSS,
                        .pio_mask = 0x1f,
                        .mwdma_mask = 0x07,
                        .udma_mask = ATA_UDMA5,
@@ -348,9 +344,7 @@ static int pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id
                }
 
        };
-       static struct ata_port_info *port_info[2];
-
-       port_info[0] = port_info[1] = &info[id->driver_data];
+       const struct ata_port_info *ppi[] = { &info[id->driver_data], NULL };
 
        if (dev->device == PCI_DEVICE_ID_PROMISE_20265) {
                struct pci_dev *bridge = dev->bus->self;
@@ -362,7 +356,7 @@ static int pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id
                                return -ENODEV;
                }
        }
-       return ata_pci_init_one(dev, port_info, 2);
+       return ata_pci_init_one(dev, ppi);
 }
 
 static const struct pci_device_id pdc202xx[] = {