mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "James Ausmus" <james.ausmus@gmail.com>
To: "Bartlomiej Zolnierkiewicz" <B.Zolnierkiewicz@elka.pw.edu.pl>
Cc: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org
Subject: [PATCH 1/1] ide: Allow disabling of UDMA for Compact Flash devices
Date: Mon, 17 Apr 2006 16:11:22 -0700	[thread overview]
Message-ID: <b79f23070604171611j784cc9afpd1bc6660cd25eed5@mail.gmail.com> (raw)

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);

             reply	other threads:[~2006-04-17 23:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-17 23:11 James Ausmus [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b79f23070604171611j784cc9afpd1bc6660cd25eed5@mail.gmail.com \
    --to=james.ausmus@gmail.com \
    --cc=B.Zolnierkiewicz@elka.pw.edu.pl \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®