mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Ide.c and Flash drives
@ 2002-01-02 18:47 Bao C. Ha
  0 siblings, 0 replies; only message in thread
From: Bao C. Ha @ 2002-01-02 18:47 UTC (permalink / raw)
  To: mlord; +Cc: linux-kernel


Hi Mark,

In the kernel 2.4.17, ide.c makes an assumption that
CompactFlash cards and their brethern don't have a
slave unit.  Unfortunately, I have two that can do
master/slave and get caught since they are side by
side: (1) CompactFlash on an IDE/ATA adapter (as
master)and (2) Simple Tech Flash disk (as slave).

I patched the following to get it to work:

--- ide.c.orig  Wed Jan  2 10:35:38 2002
+++ ide.c       Wed Jan  2 10:39:44 2002
@@ -324,13 +324,14 @@
        struct hd_driveid *id = drive->id;

        if (drive->removable && id != NULL) {
-               if (id->config == 0x848a) return 1;     /* CompactFlash */
+               /* if (id->config == 0x848a) return 1;  */ /* CompactFlash
*/
                if (!strncmp(id->model, "KODAK ATA_FLASH", 15)  /* Kodak */
                 || !strncmp(id->model, "Hitachi CV", 10)       /* Hitachi
*/
                 || !strncmp(id->model, "SunDisk SDCFB", 13)    /* SunDisk
*/
                 || !strncmp(id->model, "HAGIWARA HPC", 12)     /* Hagiwara
*/
                 || !strncmp(id->model, "LEXAR ATA_FLASH", 15)  /* Lexar */
-                || !strncmp(id->model, "ATA_FLASH", 9))        /* Simple
Tech */
+                /* || !strncmp(id->model, "ATA_FLASH", 9)) */  /* Simple
Tech */
+                )
                {
                        return 1;       /* yes, it is a flash memory card */
                }

Could the assumption be re-evaluated?  Am I going to
get into trouble doing this?

Regards.
Bao


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-01-02 18:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-02 18:47 Ide.c and Flash drives Bao C. Ha

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®