ata_piix: add another TECRA M3 entry to broken suspend list
[sfrench/cifs-2.6.git] / drivers / ata / pata_marvell.c
index d9b94a1b6954ed384b3d351858cd91f4a7baed70..ae206f35f747a677e54675847e6fb049c4043569 100644 (file)
 /**
  *     marvell_pre_reset       -       check for 40/80 pin
  *     @ap: Port
+ *     @deadline: deadline jiffies for the operation
  *
  *     Perform the PATA port setup we need.
  */
 
-static int marvell_pre_reset(struct ata_port *ap)
+static int marvell_pre_reset(struct ata_port *ap, unsigned long deadline)
 {
        struct pci_dev *pdev = to_pci_dev(ap->host->dev);
        u32 devices;
@@ -52,7 +53,8 @@ static int marvell_pre_reset(struct ata_port *ap)
        if ((pdev->device == 0x6145) && (ap->port_no == 0) &&
            (!(devices & 0x10)))        /* PATA enable ? */
                return -ENOENT;
-       return ata_std_prereset(ap);
+
+       return ata_std_prereset(ap, deadline);
 }
 
 static int marvell_cable_detect(struct ata_port *ap)
@@ -67,6 +69,7 @@ static int marvell_cable_detect(struct ata_port *ap)
        case 1: /* Legacy SATA port */
                return ATA_CBL_SATA;
        }
+
        BUG();
        return 0;       /* Our BUG macro needs the right markup */
 }
@@ -104,10 +107,6 @@ static struct scsi_host_template marvell_sht = {
        .slave_destroy          = ata_scsi_slave_destroy,
        /* Use standard CHS mapping rules */
        .bios_param             = ata_std_bios_param,
-#ifdef CONFIG_PM
-       .resume                 = ata_scsi_device_resume,
-       .suspend                = ata_scsi_device_suspend,
-#endif
 };
 
 static const struct ata_port_operations marvell_ops = {
@@ -162,38 +161,39 @@ static const struct ata_port_operations marvell_ops = {
 
 static int marvell_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
 {
-       static struct ata_port_info info = {
+       static const struct ata_port_info info = {
                .sht            = &marvell_sht,
-               .flags          = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
+               .flags          = ATA_FLAG_SLAVE_POSS,
 
                .pio_mask       = 0x1f,
                .mwdma_mask     = 0x07,
-               .udma_mask      = 0x3f,
+               .udma_mask      = ATA_UDMA5,
 
                .port_ops       = &marvell_ops,
        };
-       static struct ata_port_info info_sata = {
+       static const struct ata_port_info info_sata = {
                .sht            = &marvell_sht,
                /* Slave possible as its magically mapped not real */
-               .flags          = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
+               .flags          = ATA_FLAG_SLAVE_POSS,
 
                .pio_mask       = 0x1f,
                .mwdma_mask     = 0x07,
-               .udma_mask      = 0x7f,
+               .udma_mask      = ATA_UDMA6,
 
                .port_ops       = &marvell_ops,
        };
-       struct ata_port_info *port_info[2] = { &info, &info_sata };
-       int n_port = 2;
+       const struct ata_port_info *ppi[] = { &info, &info_sata };
 
        if (pdev->device == 0x6101)
-               n_port = 1;
+               ppi[1] = &ata_dummy_port_info;
 
-       return ata_pci_init_one(pdev, port_info, n_port);
+       return ata_pci_init_one(pdev, ppi);
 }
 
 static const struct pci_device_id marvell_pci_tbl[] = {
        { PCI_DEVICE(0x11AB, 0x6101), },
+       { PCI_DEVICE(0x11AB, 0x6121), },
+       { PCI_DEVICE(0x11AB, 0x6123), },
        { PCI_DEVICE(0x11AB, 0x6145), },
        { }     /* terminate list */
 };