diff options
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/ide-iops.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index e17a9ee120ea..1cdf688a5422 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c | |||
@@ -756,7 +756,7 @@ int ide_driveid_update(ide_drive_t *drive) | |||
756 | int ide_config_drive_speed(ide_drive_t *drive, u8 speed) | 756 | int ide_config_drive_speed(ide_drive_t *drive, u8 speed) |
757 | { | 757 | { |
758 | ide_hwif_t *hwif = drive->hwif; | 758 | ide_hwif_t *hwif = drive->hwif; |
759 | int error; | 759 | int error = 0; |
760 | u8 stat; | 760 | u8 stat; |
761 | 761 | ||
762 | // while (HWGROUP(drive)->busy) | 762 | // while (HWGROUP(drive)->busy) |
@@ -767,6 +767,10 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed) | |||
767 | hwif->dma_host_off(drive); | 767 | hwif->dma_host_off(drive); |
768 | #endif | 768 | #endif |
769 | 769 | ||
770 | /* Skip setting PIO flow-control modes on pre-EIDE drives */ | ||
771 | if ((speed & 0xf8) == XFER_PIO_0 && !(drive->id->capability & 0x08)) | ||
772 | goto skip; | ||
773 | |||
770 | /* | 774 | /* |
771 | * Don't use ide_wait_cmd here - it will | 775 | * Don't use ide_wait_cmd here - it will |
772 | * attempt to set_geometry and recalibrate, | 776 | * attempt to set_geometry and recalibrate, |
@@ -814,6 +818,7 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed) | |||
814 | drive->id->dma_mword &= ~0x0F00; | 818 | drive->id->dma_mword &= ~0x0F00; |
815 | drive->id->dma_1word &= ~0x0F00; | 819 | drive->id->dma_1word &= ~0x0F00; |
816 | 820 | ||
821 | skip: | ||
817 | #ifdef CONFIG_BLK_DEV_IDEDMA | 822 | #ifdef CONFIG_BLK_DEV_IDEDMA |
818 | if (speed >= XFER_SW_DMA_0) | 823 | if (speed >= XFER_SW_DMA_0) |
819 | hwif->dma_host_on(drive); | 824 | hwif->dma_host_on(drive); |