pata_ali: Fix regression with old devices
[safe/jmp/linux-2.6] / drivers / ata / pata_jmicron.c
index 61ff5c6..3a1474a 100644 (file)
@@ -4,7 +4,7 @@
  *                     driven by AHCI in the usual configuration although
  *                     this driver can handle other setups if we need it.
  *
- *     (c) 2006 Red Hat  <alan@redhat.com>
+ *     (c) 2006 Red Hat
  */
 
 #include <linux/kernel.h>
@@ -102,21 +102,7 @@ static int jmicron_pre_reset(struct ata_link *link, unsigned long deadline)
                ap->cbl = ATA_CBL_SATA;
                break;
        }
-       return ata_std_prereset(link, deadline);
-}
-
-/**
- *     jmicron_error_handler - Setup and error handler
- *     @ap: Port to handle
- *
- *     LOCKING:
- *     None (inherited from caller).
- */
-
-static void jmicron_error_handler(struct ata_port *ap)
-{
-       ata_bmdma_drive_eh(ap, jmicron_pre_reset, ata_std_softreset, NULL,
-                          ata_std_postreset);
+       return ata_sff_prereset(link, deadline);
 }
 
 /* No PIO or DMA methods needed for this device */
@@ -127,7 +113,7 @@ static struct scsi_host_template jmicron_sht = {
 
 static struct ata_port_operations jmicron_ops = {
        .inherits               = &ata_bmdma_port_ops,
-       .error_handler          = jmicron_error_handler,
+       .prereset               = jmicron_pre_reset,
 };
 
 
@@ -148,18 +134,17 @@ static struct ata_port_operations jmicron_ops = {
 static int jmicron_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
 {
        static const struct ata_port_info info = {
-               .sht            = &jmicron_sht,
                .flags  = ATA_FLAG_SLAVE_POSS,
 
-               .pio_mask       = 0x1f,
-               .mwdma_mask     = 0x07,
+               .pio_mask       = ATA_PIO4,
+               .mwdma_mask     = ATA_MWDMA2,
                .udma_mask      = ATA_UDMA5,
 
                .port_ops       = &jmicron_ops,
        };
        const struct ata_port_info *ppi[] = { &info, NULL };
 
-       return ata_pci_init_one(pdev, ppi);
+       return ata_pci_sff_init_one(pdev, ppi, &jmicron_sht, NULL);
 }
 
 static const struct pci_device_id jmicron_pci_tbl[] = {