drivers/video/msm: update to new kernel
[safe/jmp/linux-2.6] / drivers / ata / pata_optidma.c
index ba2819f..86885a4 100644 (file)
@@ -1,7 +1,6 @@
 /*
  * pata_optidma.c      - Opti DMA PATA for new ATA layer
  *                       (C) 2006 Red Hat Inc
- *                       Alan Cox <alan@redhat.com>
  *
  *     The Opti DMA controllers are related to the older PIO PCI controllers
  *     and indeed the VLB ones. The main differences are that the timing
@@ -64,22 +63,7 @@ static int optidma_pre_reset(struct ata_link *link, unsigned long deadline)
        if (ap->port_no && !pci_test_config_bits(pdev, &optidma_enable_bits))
                return -ENOENT;
 
-       return ata_std_prereset(link, deadline);
-}
-
-/**
- *     optidma_probe_reset             -       probe reset
- *     @ap: ATA port
- *
- *     Perform the ATA probe and bus reset sequence plus specific handling
- *     for this hardware. The Opti needs little handling - we have no UDMA66
- *     capability that needs cable detection. All we must do is check the port
- *     is enabled.
- */
-
-static void optidma_error_handler(struct ata_port *ap)
-{
-       ata_bmdma_drive_eh(ap, optidma_pre_reset, ata_std_softreset, NULL, ata_std_postreset);
+       return ata_sff_prereset(link, deadline);
 }
 
 /**
@@ -359,7 +343,7 @@ static struct ata_port_operations optidma_port_ops = {
        .set_piomode    = optidma_set_pio_mode,
        .set_dmamode    = optidma_set_dma_mode,
        .set_mode       = optidma_set_mode,
-       .error_handler  = optidma_error_handler,
+       .prereset       = optidma_pre_reset,
 };
 
 static struct ata_port_operations optiplus_port_ops = {
@@ -415,15 +399,15 @@ static int optidma_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
        static const struct ata_port_info info_82c700 = {
                .flags = ATA_FLAG_SLAVE_POSS,
-               .pio_mask = 0x1f,
-               .mwdma_mask = 0x07,
+               .pio_mask = ATA_PIO4,
+               .mwdma_mask = ATA_MWDMA2,
                .port_ops = &optidma_port_ops
        };
        static const struct ata_port_info info_82c700_udma = {
                .flags = ATA_FLAG_SLAVE_POSS,
-               .pio_mask = 0x1f,
-               .mwdma_mask = 0x07,
-               .udma_mask = 0x07,
+               .pio_mask = ATA_PIO4,
+               .mwdma_mask = ATA_MWDMA2,
+               .udma_mask = ATA_UDMA2,
                .port_ops = &optiplus_port_ops
        };
        const struct ata_port_info *ppi[] = { &info_82c700, NULL };
@@ -445,7 +429,7 @@ static int optidma_init_one(struct pci_dev *dev, const struct pci_device_id *id)
        if (optiplus_with_udma(dev))
                ppi[0] = &info_82c700_udma;
 
-       return ata_pci_init_one(dev, ppi, &optidma_sht, NULL);
+       return ata_pci_sff_init_one(dev, ppi, &optidma_sht, NULL);
 }
 
 static const struct pci_device_id optidma[] = {