Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq
[powerpc.git] / drivers / ide / pci / hpt34x.c
index 6707f39..924eaa3 100644 (file)
@@ -109,31 +109,19 @@ static int config_chipset_for_dma (ide_drive_t *drive)
 
 static int hpt34x_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 && (id->capability & 1) && drive->autodma) {
-
-               if (ide_use_dma(drive)) {
-                       if (config_chipset_for_dma(drive))
+       if (ide_use_dma(drive) && config_chipset_for_dma(drive))
 #ifndef CONFIG_HPT34X_AUTODMA
-                               return hwif->ide_dma_off_quietly(drive);
+               return -1;
 #else
-                               return hwif->ide_dma_on(drive);
+               return 0;
 #endif
-               }
 
-               goto fast_ata_pio;
-
-       } else if ((id->capability & 8) || (id->field_valid & 2)) {
-fast_ata_pio:
+       if (ide_use_fast_pio(drive))
                hpt34x_tune_drive(drive, 255);
-               return hwif->ide_dma_off_quietly(drive);
-       }
-       /* IORDY not supported */
-       return 0;
+
+       return -1;
 }
 
 /*
@@ -194,7 +182,6 @@ static void __devinit init_hwif_hpt34x(ide_hwif_t *hwif)
 
        hwif->tuneproc = &hpt34x_tune_drive;
        hwif->speedproc = &hpt34x_tune_chipset;
-       hwif->no_dsc = 1;
        hwif->drives[0].autotune = 1;
        hwif->drives[1].autotune = 1;