[POWERPC] mpc52xx_pic: fix main interrupt masking
[powerpc.git] / drivers / ide / pci / serverworks.c
index 9e92e7b..dbcd37a 100644 (file)
@@ -160,7 +160,7 @@ static int svwks_tune_chipset (ide_drive_t *drive, u8 xferspeed)
        if ((dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE) ||
            (dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2)) {
                if (!drive->init_speed) {
-                       u8 dma_stat = hwif->INB(hwif->dma_status);
+                       u8 dma_stat = inb(hwif->dma_status);
 
 dma_pio:
                        if (((ultra_enable << (7-drive->dn) & 0x80) == 0x80) &&
@@ -315,20 +315,15 @@ static int config_chipset_for_dma (ide_drive_t *drive)
 
 static int svwks_config_drive_xfer_rate (ide_drive_t *drive)
 {
-       ide_hwif_t *hwif        = HWIF(drive);
-
        drive->init_speed = 0;
 
        if (ide_use_dma(drive) && config_chipset_for_dma(drive))
-               return hwif->ide_dma_on(drive);
+               return 0;
 
-       if (ide_use_fast_pio(drive)) {
+       if (ide_use_fast_pio(drive))
                config_chipset_for_pio(drive);
-               //      hwif->tuneproc(drive, 5);
-               return hwif->ide_dma_off_quietly(drive);
-       }
-       /* IORDY not supported */
-       return 0;
+
+       return -1;
 }
 
 static unsigned int __devinit init_chipset_svwks (struct pci_dev *dev, const char *name)
@@ -529,7 +524,7 @@ static void __devinit init_hwif_svwks (ide_hwif_t *hwif)
        if (!noautodma)
                hwif->autodma = 1;
 
-       dma_stat = hwif->INB(hwif->dma_status);
+       dma_stat = inb(hwif->dma_status);
        hwif->drives[0].autodma = (dma_stat & 0x20);
        hwif->drives[1].autodma = (dma_stat & 0x40);
        hwif->drives[0].autotune = (!(dma_stat & 0x20));