aboutsummaryrefslogtreecommitdiffstats
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
parent0a8348d08677ad77ee353f96eb8745c693a05a13 (diff)
downloadkernel_samsung_crespo-71ef51cc1756d1c56b57c70e7cc27a3559c81ee6.zip
kernel_samsung_crespo-71ef51cc1756d1c56b57c70e7cc27a3559c81ee6.tar.gz
kernel_samsung_crespo-71ef51cc1756d1c56b57c70e7cc27a3559c81ee6.tar.bz2
[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.c11
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;
}
/**