public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] ide: Allow disabling of UDMA for Compact Flash devices
@ 2006-04-17 23:11 James Ausmus
  2006-04-18  3:21 ` Mark Lord
  2006-04-18 11:14 ` Alan Cox
  0 siblings, 2 replies; 8+ messages in thread
From: James Ausmus @ 2006-04-17 23:11 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: linux-kernel, linux-ide

Some IDE -> Compact Flash media adapters are not capable of supporting
UDMA, which can cause very slow boot times when the CF media itself
reports as capable of UDMA transfer speeds. Create Kconfig option to
turn off the UDMA capability bit when media is identified as Compact
Flash.

Signed-off-by: James Ausmus <james.ausmus@gmail.com>

---

diff -uprN -X linux-2.6.16.5/Documentation/dontdiff
linux-2.6.16.5.orig/drivers/ide/Kconfig
linux-2.6.16.5/drivers/ide/Kconfig
--- linux-2.6.16.5.orig/drivers/ide/Kconfig     2006-04-17
13:37:47.000000000 -0700
+++ linux-2.6.16.5/drivers/ide/Kconfig  2006-04-17 13:43:37.000000000 -0700
@@ -447,6 +447,18 @@ config IDEDMA_ONLYDISK

          Generally say N here.

+config IDE_COMPACT_FLASH_NO_UDMA
+       bool "Disable UDMA for Compact Flash Devices"
+       help
+         This turns off the UDMA capability flag bit for any IDE device
+         that identifies as Compact Flash - This is a workaround for
+         cheap Compact Flash -> IDE adapters that don't support UDMA
+         transfer speeds even if the CF card does.
+
+         Enable this if you are using a Compact Flash card as an IDE
+         device and you see re-occuring 0x41 DMA Timeout errors from
+         your IDE driver.
+
 config BLK_DEV_AEC62XX
        tristate "AEC62XX chipset support"
        help
diff -uprN -X linux-2.6.16.5/Documentation/dontdiff
linux-2.6.16.5.orig/drivers/ide/ide-probe.c
linux-2.6.16.5/drivers/ide/ide-probe.c
--- linux-2.6.16.5.orig/drivers/ide/ide-probe.c 2006-04-17
13:37:48.000000000 -0700
+++ linux-2.6.16.5/drivers/ide/ide-probe.c      2006-04-17
13:44:45.000000000 -0700
@@ -248,6 +248,11 @@ static inline void do_identify (ide_driv
        if ((id->config != 0x848a) && (id->config & (1<<7)))
                drive->removable = 1;

+#if defined(CONFIG_IDE_COMPACT_FLASH_NO_UDMA)
+       if (id->config == 0x848a)
+               id->capability &= ~1;
+#endif
+
        drive->media = ide_disk;
        printk("%s DISK drive\n", (id->config == 0x848a) ? "CFA" : "ATA" );
        QUIRK_LIST(drive);

^ permalink raw reply	[flat|nested] 8+ messages in thread
[parent not found: <62LaJ-6vK-5@gated-at.bofh.it>]

end of thread, other threads:[~2006-04-19 15:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-17 23:11 [PATCH 1/1] ide: Allow disabling of UDMA for Compact Flash devices James Ausmus
2006-04-18  3:21 ` Mark Lord
2006-04-18 11:14 ` Alan Cox
2006-04-18 11:34   ` Andreas Mohr
2006-04-18 11:52     ` Alan Cox
2006-04-18 16:32       ` James Ausmus
     [not found] <62LaJ-6vK-5@gated-at.bofh.it>
     [not found] ` <62Wg0-6f8-29@gated-at.bofh.it>
     [not found]   ` <62WJ1-6Od-31@gated-at.bofh.it>
     [not found]     ` <62WSE-70D-21@gated-at.bofh.it>
     [not found]       ` <631pe-5Gt-7@gated-at.bofh.it>
2006-04-19  2:44         ` Robert Hancock
2006-04-19 15:35           ` James Ausmus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox