summaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/pdc202xx_old.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/pdc202xx_old.c')
-rw-r--r--drivers/ide/pci/pdc202xx_old.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c
index 80eb6d271330..a2be3d2fd3f6 100644
--- a/drivers/ide/pci/pdc202xx_old.c
+++ b/drivers/ide/pci/pdc202xx_old.c
@@ -323,21 +323,13 @@ chipset_is_set:
static int pdc202xx_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))
- return hwif->ide_dma_on(drive);
- }
-
- goto fast_ata_pio;
+ if (ide_use_dma(drive) && config_chipset_for_dma(drive))
+ return hwif->ide_dma_on(drive);
- } else if ((id->capability & 8) || (id->field_valid & 2)) {
-fast_ata_pio:
+ if (ide_use_fast_pio(drive)) {
pdc202xx_tune_drive(drive, 255);
return hwif->ide_dma_off_quietly(drive);
}