Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
[safe/jmp/linux-2.6] / drivers / ata / pata_triflex.c
index bc4956e..48f5060 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * pata_triflex.c      - Compaq PATA for new ATA layer
  *                       (C) 2005 Red Hat Inc
- *                       Alan Cox <alan@redhat.com>
+ *                       Alan Cox <alan@lxorguk.ukuu.org.uk>
  *
  * based upon
  *
@@ -66,16 +66,11 @@ static int triflex_prereset(struct ata_link *link, unsigned long deadline)
        if (!pci_test_config_bits(pdev, &triflex_enable_bits[ap->port_no]))
                return -ENOENT;
 
-       return ata_std_prereset(link, deadline);
+       return ata_sff_prereset(link, deadline);
 }
 
 
 
-static void triflex_error_handler(struct ata_port *ap)
-{
-       ata_bmdma_drive_eh(ap, triflex_prereset, ata_std_softreset, NULL, ata_std_postreset);
-}
-
 /**
  *     triflex_load_timing             -       timing configuration
  *     @ap: ATA interface
@@ -189,16 +184,15 @@ static struct ata_port_operations triflex_port_ops = {
        .bmdma_stop     = triflex_bmdma_stop,
        .cable_detect   = ata_cable_40wire,
        .set_piomode    = triflex_set_piomode,
-       .error_handler  = triflex_error_handler,
+       .prereset       = triflex_prereset,
 };
 
 static int triflex_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
        static const struct ata_port_info info = {
-               .sht = &triflex_sht,
                .flags = ATA_FLAG_SLAVE_POSS,
-               .pio_mask = 0x1f,
-               .mwdma_mask = 0x07,
+               .pio_mask = ATA_PIO4,
+               .mwdma_mask = ATA_MWDMA2,
                .port_ops = &triflex_port_ops
        };
        const struct ata_port_info *ppi[] = { &info, NULL };
@@ -207,7 +201,7 @@ static int triflex_init_one(struct pci_dev *dev, const struct pci_device_id *id)
        if (!printed_version++)
                dev_printk(KERN_DEBUG, &dev->dev, "version " DRV_VERSION "\n");
 
-       return ata_pci_init_one(dev, ppi);
+       return ata_pci_sff_init_one(dev, ppi, &triflex_sht, NULL, 0);
 }
 
 static const struct pci_device_id triflex[] = {