Skip to contentSkip to conversation

Ide.c and Flash drives

PATCH Bao C. Ha 1 participant 1 message Jan 2, 2002

lore
Share & tools
lore

Bao C. Ha

author
#0 lore raw

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 Wed Jan 2 10:39:44 2002 renamed from ide.c.orig Wed Jan 2 10:35:38 2002 +1 -1
@@ -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