diff options
Diffstat (limited to 'drivers/ide/pci/piix.c')
-rw-r--r-- | drivers/ide/pci/piix.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/ide/pci/piix.c b/drivers/ide/pci/piix.c index 247334473519..85e8a78e10ad 100644 --- a/drivers/ide/pci/piix.c +++ b/drivers/ide/pci/piix.c | |||
@@ -387,19 +387,13 @@ static int piix_config_drive_for_dma (ide_drive_t *drive) | |||
387 | static int piix_config_drive_xfer_rate (ide_drive_t *drive) | 387 | static int piix_config_drive_xfer_rate (ide_drive_t *drive) |
388 | { | 388 | { |
389 | ide_hwif_t *hwif = HWIF(drive); | 389 | ide_hwif_t *hwif = HWIF(drive); |
390 | struct hd_driveid *id = drive->id; | ||
391 | 390 | ||
392 | drive->init_speed = 0; | 391 | drive->init_speed = 0; |
393 | 392 | ||
394 | if ((id->capability & 1) && drive->autodma) { | 393 | if (ide_use_dma(drive) && piix_config_drive_for_dma(drive)) |
394 | return hwif->ide_dma_on(drive); | ||
395 | 395 | ||
396 | if (ide_use_dma(drive) && piix_config_drive_for_dma(drive)) | 396 | if (ide_use_fast_pio(drive)) { |
397 | return hwif->ide_dma_on(drive); | ||
398 | |||
399 | goto fast_ata_pio; | ||
400 | |||
401 | } else if ((id->capability & 8) || (id->field_valid & 2)) { | ||
402 | fast_ata_pio: | ||
403 | /* Find best PIO mode. */ | 397 | /* Find best PIO mode. */ |
404 | (void) hwif->speedproc(drive, XFER_PIO_0 + | 398 | (void) hwif->speedproc(drive, XFER_PIO_0 + |
405 | ide_get_best_pio_mode(drive, 255, 4, NULL)); | 399 | ide_get_best_pio_mode(drive, 255, 4, NULL)); |