]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ide/pci/tc86c001.c
ide: add ide_use_fast_pio() helper (v3)
[linux-2.6-omap-h63xx.git] / drivers / ide / pci / tc86c001.c
index 2ad72bbda34217bb3b351bda50065ee5d5385b4f..4e893808f063ca1906df354aaf9ba485a9cd7f83 100644 (file)
@@ -186,17 +186,11 @@ static int config_chipset_for_dma(ide_drive_t *drive)
 static int tc86c001_config_drive_xfer_rate(ide_drive_t *drive)
 {
        ide_hwif_t *hwif        = HWIF(drive);
-       struct hd_driveid *id   = drive->id;
 
-       if ((id->capability & 1) && drive->autodma) {
+       if (ide_use_dma(drive) && config_chipset_for_dma(drive))
+               return hwif->ide_dma_on(drive);
 
-               if (ide_use_dma(drive) && config_chipset_for_dma(drive))
-                       return hwif->ide_dma_on(drive);
-
-               goto fast_ata_pio;
-
-       } else if ((id->capability & 8) || (id->field_valid & 2)) {
-fast_ata_pio:
+       if (ide_use_fast_pio(drive)) {
                tc86c001_tune_drive(drive, 255);
                return hwif->ide_dma_off_quietly(drive);
        }