* [PATCH 4/11] hpt34x: fix CONFIG_HPT34X_AUTODMA=n handling
@ 2007-08-04 20:07 Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; only message in thread
From: Bartlomiej Zolnierkiewicz @ 2007-08-04 20:07 UTC (permalink / raw)
To: linux-ide
Programming DMA mode may destroy current PIO mode setting so if
CONFIG_HPT34X_AUTODMA=n (the default case) make ide_tune_dma() fail
early by disabling all host DMA masks and re-tune PIO mode.
This fix doesn't help with the driver being broken but is needed
for some other changes.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ide/pci/hpt34x.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
Index: b/drivers/ide/pci/hpt34x.c
===================================================================
--- a/drivers/ide/pci/hpt34x.c
+++ b/drivers/ide/pci/hpt34x.c
@@ -85,11 +85,7 @@ static int hpt34x_config_drive_xfer_rate
drive->init_speed = 0;
if (ide_tune_dma(drive))
-#ifndef CONFIG_HPT34X_AUTODMA
return -1;
-#else
- return 0;
-#endif
if (ide_use_fast_pio(drive))
ide_set_max_pio(drive);
@@ -157,9 +153,11 @@ static void __devinit init_hwif_hpt34x(i
if (!hwif->dma_base)
return;
+#ifdef CONFIG_HPT34X_AUTODMA
hwif->ultra_mask = 0x07;
hwif->mwdma_mask = 0x07;
hwif->swdma_mask = 0x07;
+#endif
hwif->ide_dma_check = &hpt34x_config_drive_xfer_rate;
if (!noautodma)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-08-04 20:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-04 20:07 [PATCH 4/11] hpt34x: fix CONFIG_HPT34X_AUTODMA=n handling Bartlomiej Zolnierkiewicz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).