Skip to content

Commit

Permalink
ide: always disable DMA before tuning it
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bartlomiej Zolnierkiewicz committed May 15, 2007
1 parent 7f86723 commit 793a972
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/ide/ide-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
1 change: 1 addition & 0 deletions drivers/ide/ide.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 793a972

Please sign in to comment.