summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2006-07-28 09:02:17 +0200
committerJens Axboe <axboe@suse.de>2006-07-28 09:02:17 +0200
commit71ef51cc1756d1c56b57c70e7cc27a3559c81ee6 (patch)
tree9aa666e956ca9ec0c5caaab1cb926789b2df93af /drivers
parent0a8348d08677ad77ee353f96eb8745c693a05a13 (diff)
[PATCH] it821x: fix ide dma setup bug
Only enable dma for a valid speed setting. Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ide/pci/it821x.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/ide/pci/it821x.c b/drivers/ide/pci/it821x.c
index 3cb04424d351..e9bad185968a 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;
}
/**