]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ide: always disable DMA before tuning it
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Tue, 15 May 2007 22:51:43 +0000 (00:51 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Tue, 15 May 2007 22:51:43 +0000 (00:51 +0200)
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: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/ide-io.c
drivers/ide/ide.c

index 8e568143d90d73e74da45f99878bceb4ea5a62b6..bfe8f1b712bad1cfc3356fdc204b2553a2f0583b 100644 (file)
@@ -223,6 +223,7 @@ static ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request *
                        break;
                if (drive->hwif->ide_dma_check == NULL)
                        break;
+               drive->hwif->dma_off_quietly(drive);
                ide_set_dma(drive);
                break;
        }
index f2b547ff7722f320b7d7d9ac8e220c4ab9c77e9d..6002713a20a1bdfbcf9f7e2a3f000d491baa6802 100644 (file)
@@ -910,6 +910,7 @@ int set_using_dma(ide_drive_t *drive, int arg)
        err = 0;
 
        if (arg) {
+               hwif->dma_off_quietly(drive);
                if (ide_set_dma(drive) || hwif->ide_dma_on(drive))
                        err = -EIO;
        } else