Merge branch 'for-2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
[safe/jmp/linux-2.6] / drivers / ata / pata_oldpiix.c
index e678af3..b811c16 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *    pata_oldpiix.c - Intel PATA/SATA controllers
  *
- *     (C) 2005 Red Hat <alan@redhat.com>
+ *     (C) 2005 Red Hat
  *
  *    Some parts based on ata_piix.c by Jeff Garzik and others.
  *
@@ -116,7 +116,6 @@ static void oldpiix_set_piomode (struct ata_port *ap, struct ata_device *adev)
  *     oldpiix_set_dmamode - Initialize host controller PATA DMA timings
  *     @ap: Port whose timings we are configuring
  *     @adev: Device to program
- *     @isich: True if the device is an ICH and has IOCFG registers
  *
  *     Set MWDMA mode for device, in host controller PCI config space.
  *
@@ -198,10 +197,10 @@ static unsigned int oldpiix_qc_issue(struct ata_queued_cmd *qc)
 
        if (adev != ap->private_data) {
                oldpiix_set_piomode(ap, adev);
-               if (adev->dma_mode)
+               if (ata_dma_enabled(adev))
                        oldpiix_set_dmamode(ap, adev);
        }
-       return ata_sff_qc_issue(qc);
+       return ata_bmdma_qc_issue(qc);
 }
 
 
@@ -239,8 +238,8 @@ static int oldpiix_init_one (struct pci_dev *pdev, const struct pci_device_id *e
        static int printed_version;
        static const struct ata_port_info info = {
                .flags          = ATA_FLAG_SLAVE_POSS,
-               .pio_mask       = 0x1f, /* pio0-4 */
-               .mwdma_mask     = 0x07, /* mwdma1-2 */
+               .pio_mask       = ATA_PIO4,
+               .mwdma_mask     = ATA_MWDMA12_ONLY,
                .port_ops       = &oldpiix_pata_ops,
        };
        const struct ata_port_info *ppi[] = { &info, NULL };
@@ -249,7 +248,7 @@ static int oldpiix_init_one (struct pci_dev *pdev, const struct pci_device_id *e
                dev_printk(KERN_DEBUG, &pdev->dev,
                           "version " DRV_VERSION "\n");
 
-       return ata_pci_sff_init_one(pdev, ppi, &oldpiix_sht, NULL);
+       return ata_pci_bmdma_init_one(pdev, ppi, &oldpiix_sht, NULL, 0);
 }
 
 static const struct pci_device_id oldpiix_pci_tbl[] = {