diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ide/pci/atiixp.c | 7 | ||||
-rw-r--r-- | drivers/ide/pci/jmicron.c | 4 | ||||
-rw-r--r-- | drivers/ide/pci/triflex.c | 8 |
3 files changed, 8 insertions, 11 deletions
diff --git a/drivers/ide/pci/atiixp.c b/drivers/ide/pci/atiixp.c index 982ac31fa995..922b315da4a0 100644 --- a/drivers/ide/pci/atiixp.c +++ b/drivers/ide/pci/atiixp.c | |||
@@ -235,11 +235,8 @@ static int atiixp_config_drive_for_dma(ide_drive_t *drive) | |||
235 | { | 235 | { |
236 | u8 speed = ide_dma_speed(drive, atiixp_ratemask(drive)); | 236 | u8 speed = ide_dma_speed(drive, atiixp_ratemask(drive)); |
237 | 237 | ||
238 | /* If no DMA speed was available then disable DMA and use PIO. */ | 238 | if (!speed) |
239 | if (!speed) { | 239 | return 0; |
240 | u8 tspeed = ide_get_best_pio_mode(drive, 255, 5, NULL); | ||
241 | speed = atiixp_dma_2_pio(XFER_PIO_0 + tspeed) + XFER_PIO_0; | ||
242 | } | ||
243 | 240 | ||
244 | (void) atiixp_speedproc(drive, speed); | 241 | (void) atiixp_speedproc(drive, speed); |
245 | return ide_dma_enable(drive); | 242 | return ide_dma_enable(drive); |
diff --git a/drivers/ide/pci/jmicron.c b/drivers/ide/pci/jmicron.c index f07bbbed1778..75c2b409908c 100644 --- a/drivers/ide/pci/jmicron.c +++ b/drivers/ide/pci/jmicron.c | |||
@@ -147,7 +147,9 @@ static int config_chipset_for_dma (ide_drive_t *drive) | |||
147 | { | 147 | { |
148 | u8 speed = ide_dma_speed(drive, jmicron_ratemask(drive)); | 148 | u8 speed = ide_dma_speed(drive, jmicron_ratemask(drive)); |
149 | 149 | ||
150 | config_jmicron_chipset_for_pio(drive, !speed); | 150 | if (!speed) |
151 | return 0; | ||
152 | |||
151 | jmicron_tune_chipset(drive, speed); | 153 | jmicron_tune_chipset(drive, speed); |
152 | return ide_dma_enable(drive); | 154 | return ide_dma_enable(drive); |
153 | } | 155 | } |
diff --git a/drivers/ide/pci/triflex.c b/drivers/ide/pci/triflex.c index b13cce1fd1a6..b0d29cd7123a 100644 --- a/drivers/ide/pci/triflex.c +++ b/drivers/ide/pci/triflex.c | |||
@@ -104,11 +104,9 @@ static int triflex_config_drive_for_dma(ide_drive_t *drive) | |||
104 | { | 104 | { |
105 | int speed = ide_dma_speed(drive, 0); /* No ultra speeds */ | 105 | int speed = ide_dma_speed(drive, 0); /* No ultra speeds */ |
106 | 106 | ||
107 | if (!speed) { | 107 | if (!speed) |
108 | u8 pspeed = ide_get_best_pio_mode(drive, 255, 4, NULL); | 108 | return 0; |
109 | speed = XFER_PIO_0 + pspeed; | 109 | |
110 | } | ||
111 | |||
112 | (void) triflex_tune_chipset(drive, speed); | 110 | (void) triflex_tune_chipset(drive, speed); |
113 | return ide_dma_enable(drive); | 111 | return ide_dma_enable(drive); |
114 | } | 112 | } |