aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-iops.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-iops.c')
-rw-r--r--drivers/ide/ide-iops.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
index e00fbbb423bf..955bac2166a2 100644
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -968,13 +968,10 @@ static ide_startstop_t reset_pollfunc (ide_drive_t *drive)
968static void check_dma_crc(ide_drive_t *drive) 968static void check_dma_crc(ide_drive_t *drive)
969{ 969{
970#ifdef CONFIG_BLK_DEV_IDEDMA 970#ifdef CONFIG_BLK_DEV_IDEDMA
971 if (drive->crc_count) { 971 ide_dma_off_quietly(drive);
972 ide_dma_off_quietly(drive); 972 ide_set_xfer_rate(drive, ide_auto_reduce_xfer(drive));
973 ide_set_xfer_rate(drive, ide_auto_reduce_xfer(drive)); 973 if (drive->current_speed >= XFER_SW_DMA_0)
974 if (drive->current_speed >= XFER_SW_DMA_0) 974 ide_dma_on(drive);
975 ide_dma_on(drive);
976 } else
977 ide_dma_off(drive);
978#endif 975#endif
979} 976}
980 977
@@ -999,17 +996,20 @@ static void pre_reset(ide_drive_t *drive)
999 else 996 else
1000 drive->post_reset = 1; 997 drive->post_reset = 1;
1001 998
1002 if (!drive->keep_settings) { 999 if (drive->using_dma) {
1003 if (drive->using_dma) { 1000 if (drive->crc_count)
1004 check_dma_crc(drive); 1001 check_dma_crc(drive);
1005 } else { 1002 else
1003 ide_dma_off(drive);
1004 }
1005
1006 if (!drive->keep_settings) {
1007 if (!drive->using_dma) {
1006 drive->unmask = 0; 1008 drive->unmask = 0;
1007 drive->io_32bit = 0; 1009 drive->io_32bit = 0;
1008 } 1010 }
1009 return; 1011 return;
1010 } 1012 }
1011 if (drive->using_dma)
1012 check_dma_crc(drive);
1013 1013
1014 if (HWIF(drive)->pre_reset != NULL) 1014 if (HWIF(drive)->pre_reset != NULL)
1015 HWIF(drive)->pre_reset(drive); 1015 HWIF(drive)->pre_reset(drive);