From: Jens Axboe Date: Fri, 28 Jul 2006 07:02:17 +0000 (+0200) Subject: [PATCH] it821x: fix ide dma setup bug X-Git-Tag: v2.6.18-rc3~26^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=71ef51cc1756d1c56b57c70e7cc27a3559c81ee6;p=platform%2Fkernel%2Flinux-exynos.git [PATCH] it821x: fix ide dma setup bug Only enable dma for a valid speed setting. Signed-off-by: Jens Axboe --- 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; } /**