aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2006-07-28 03:02:17 -0400
committerJens Axboe <axboe@suse.de>2006-07-28 03:02:17 -0400
commit71ef51cc1756d1c56b57c70e7cc27a3559c81ee6 (patch)
tree9aa666e956ca9ec0c5caaab1cb926789b2df93af /drivers/ide
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/ide')
-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)
498{ 498{
499 u8 speed = ide_dma_speed(drive, it821x_ratemask(drive)); 499 u8 speed = ide_dma_speed(drive, it821x_ratemask(drive));
500 500
501 config_it821x_chipset_for_pio(drive, !speed); 501 if (speed) {
502 it821x_tune_chipset(drive, speed); 502 config_it821x_chipset_for_pio(drive, 0);
503 return ide_dma_enable(drive); 503 it821x_tune_chipset(drive, speed);
504
505 return ide_dma_enable(drive);
506 }
507
508 return 0;
504} 509}
505 510
506/** 511/**