]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/ata/pata_jmicron.c
libata: ignore deverr on SETXFER if mode is configured
[mv-sheeva.git] / drivers / ata / pata_jmicron.c
index 1619b86b74af5d78357ab7af0df9bb7b7bc648a0..5b8174d940670493e5439ab2338276c5b1b4de31 100644 (file)
@@ -80,11 +80,10 @@ static int jmicron_pre_reset(struct ata_link *link, unsigned long deadline)
         *      actually do our cable checking etc. Thankfully we don't need
         *      to do the plumbing for other cases.
         */
-       switch (port_map[port])
-       {
+       switch (port_map[port]) {
        case PORT_PATA0:
-               if (control & (1 << 5))
-                       return 0;
+               if ((control & (1 << 5)) == 0)
+                       return -ENOENT;
                if (control & (1 << 3)) /* 40/80 pin primary */
                        ap->cbl = ATA_CBL_PATA40;
                else
@@ -93,7 +92,7 @@ static int jmicron_pre_reset(struct ata_link *link, unsigned long deadline)
        case PORT_PATA1:
                /* Bit 21 is set if the port is enabled */
                if ((control5 & (1 << 21)) == 0)
-                       return 0;
+                       return -ENOENT;
                if (control5 & (1 << 19))       /* 40/80 pin secondary */
                        ap->cbl = ATA_CBL_PATA40;
                else
@@ -141,8 +140,6 @@ static struct scsi_host_template jmicron_sht = {
 };
 
 static const struct ata_port_operations jmicron_ops = {
-       .port_disable           = ata_port_disable,
-
        /* Task file is PCI ATA format, use helpers */
        .tf_load                = ata_tf_load,
        .tf_read                = ata_tf_read,
@@ -168,7 +165,6 @@ static const struct ata_port_operations jmicron_ops = {
        .irq_handler            = ata_interrupt,
        .irq_clear              = ata_bmdma_irq_clear,
        .irq_on                 = ata_irq_on,
-       .irq_ack                = ata_irq_ack,
 
        /* Generic PATA PCI ATA helpers */
        .port_start             = ata_port_start,
@@ -207,17 +203,8 @@ static int jmicron_init_one (struct pci_dev *pdev, const struct pci_device_id *i
 }
 
 static const struct pci_device_id jmicron_pci_tbl[] = {
-       { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB361,
-         PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8, 0xffff00, 361 },
-       { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB363,
-         PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8, 0xffff00, 363 },
-       { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB365,
-         PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8, 0xffff00, 365 },
-       { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB366,
-         PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8, 0xffff00, 366 },
-       { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB368,
-         PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8, 0xffff00, 368 },
-
+       { PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
+         PCI_CLASS_STORAGE_IDE << 8, 0xffff00, 0 },
        { }     /* terminate list */
 };