Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
[pandora-kernel.git] / drivers / ide / pci / slc90e66.c
index 2663ddb..ae7eb58 100644 (file)
@@ -179,26 +179,16 @@ static int slc90e66_config_drive_for_dma (ide_drive_t *drive)
 
 static int slc90e66_config_drive_xfer_rate (ide_drive_t *drive)
 {
-       ide_hwif_t *hwif        = HWIF(drive);
-       struct hd_driveid *id   = drive->id;
-
        drive->init_speed = 0;
 
-       if ((id->capability & 1) && drive->autodma) {
-
-               if (ide_use_dma(drive) && slc90e66_config_drive_for_dma(drive))
-                       return hwif->ide_dma_on(drive);
+       if (ide_use_dma(drive) && slc90e66_config_drive_for_dma(drive))
+               return 0;
 
-               goto fast_ata_pio;
+       if (ide_use_fast_pio(drive))
+               (void)slc90e66_tune_chipset(drive, XFER_PIO_0 +
+                               ide_get_best_pio_mode(drive, 255, 4, NULL));
 
-       } else if ((id->capability & 8) || (id->field_valid & 2)) {
-fast_ata_pio:
-               (void) hwif->speedproc(drive, XFER_PIO_0 +
-                                      ide_get_best_pio_mode(drive, 255, 4, NULL));
-               return hwif->ide_dma_off_quietly(drive);
-       }
-       /* IORDY not supported */
-       return 0;
+       return -1;
 }
 
 static void __devinit init_hwif_slc90e66 (ide_hwif_t *hwif)