ide: always disable DMA before tuning it

ide_start_power_step() and set_using_dma() were missing ->dma_off_quietly
call (comment in probe_hwif() states that DMA should be always cleared before
tuning is attempted).  Fix it.
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 7f86723a
...@@ -223,6 +223,7 @@ static ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request * ...@@ -223,6 +223,7 @@ static ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request *
break; break;
if (drive->hwif->ide_dma_check == NULL) if (drive->hwif->ide_dma_check == NULL)
break; break;
drive->hwif->dma_off_quietly(drive);
ide_set_dma(drive); ide_set_dma(drive);
break; break;
} }
......
...@@ -910,6 +910,7 @@ int set_using_dma(ide_drive_t *drive, int arg) ...@@ -910,6 +910,7 @@ int set_using_dma(ide_drive_t *drive, int arg)
err = 0; err = 0;
if (arg) { if (arg) {
hwif->dma_off_quietly(drive);
if (ide_set_dma(drive) || hwif->ide_dma_on(drive)) if (ide_set_dma(drive) || hwif->ide_dma_on(drive))
err = -EIO; err = -EIO;
} else } else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment