diff options
author | Jens Axboe <axboe@suse.de> | 2006-07-28 09:02:17 +0200 |
---|---|---|
committer | Jens Axboe <axboe@suse.de> | 2006-07-28 09:02:17 +0200 |
commit | 71ef51cc1756d1c56b57c70e7cc27a3559c81ee6 (patch) | |
tree | 9aa666e956ca9ec0c5caaab1cb926789b2df93af | |
parent | 0a8348d08677ad77ee353f96eb8745c693a05a13 (diff) | |
download | op-kernel-dev-71ef51cc1756d1c56b57c70e7cc27a3559c81ee6.zip op-kernel-dev-71ef51cc1756d1c56b57c70e7cc27a3559c81ee6.tar.gz |
[PATCH] it821x: fix ide dma setup bug
Only enable dma for a valid speed setting.
Signed-off-by: Jens Axboe <axboe@suse.de>
-rw-r--r-- | drivers/ide/pci/it821x.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/ide/pci/it821x.c b/drivers/ide/pci/it821x.c index 3cb0442..e9bad18 100644 --- a/drivers/ide/pci/it821x.c +++ b/drivers/ide/pci/it821x.c @@ -498,9 +498,14 @@ static int config_chipset_for_dma (ide_drive_t *drive) { u8 speed = ide_dma_speed(drive, it821x_ratemask(drive)); - config_it821x_chipset_for_pio(drive, !speed); - it821x_tune_chipset(drive, speed); - return ide_dma_enable(drive); + if (speed) { + config_it821x_chipset_for_pio(drive, 0); + it821x_tune_chipset(drive, speed); + + return ide_dma_enable(drive); + } + + return 0; } /** |