SanDisk is flash (fwd)
PATCH 1/1 SanDisk is flash (fwd)
The patch forwarded below by Meelis Roos was already included in 2.4.26-rc. It does apply against 2.6, too, so I assume it should also be added there?
cu
Adrian
----- Forwarded message from Meelis Roos <[email protected]> -----
Date: Thu, 1 Apr 2004 21:26:13 +0300 (EEST)
From: Meelis Roos <[email protected]>
To: Linux Kernel list <[email protected]>
Subject: [2.4 IDE PATCH] SanDisk is flash
This is self-explanatory - former SunDisk renamed itself to SanDisk and now there are flash disks with both names.
===== drivers/ide/ide-probe.c 1.21 vs edited =====
drivers/ide/ide-probe.c +2 -1
@@ -102,7 +102,8 @@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,"SunDisk SDCFB" ,13 )/* old SanDisk */ + || !strncmp (id->model,"SanDisk SDCFB" ,13 )/* SanDisk */ || !strncmp (id->model,"HAGIWARA HPC" ,12 )/* Hagiwara */ || !strncmp (id->model,"LEXAR ATA_FLASH" ,15 )/* Lexar */ || !strncmp (id->model,"ATA_FLASH" ,9 ))/* Simple Tech */
Signature · 10 lines
Meelis Roos ([email protected]) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ ----- End forwarded message -----
Quoted 3 lines · Adrian Bunk
The patch forwarded below by Meelis Roos was already included in 2.4.26-rc. It does apply against 2.6, too, so I assume it should also be added there?
Some time ago I sent mail to Meelis asking if this patch is really necessary. No answer yet.
Quoted 6 lines
cu
Adrian----- Forwarded message from Meelis Roos <[email protected]> -----
Quoted 7 lines
Date: Thu, 1 Apr 2004 21:26:13 +0300 (EEST)
From: Meelis Roos <[email protected]>
To: Linux Kernel list <[email protected]>
Subject: [2.4 IDE PATCH] SanDisk is flashThis is self-explanatory - former SunDisk renamed itself to SanDisk and now there are flash disks with both names.
Please excuse me but I am dumb... ;-)
Does this mean that CF test fail or that SunDisk is SanDisk now?
id->config == 0x848a test was introduced in kernel 2.3.27 _after_ SunDisk model name test and if id->config == 0x848a test fails comment to drive_is_flashcard() needs fixing.
Quoted 16 lines
=====
drivers/ide/ide-probe.c1.21 vs edited =====drivers/ide/ide-probe.c +2
-1@@ -102,7 +102,8 @@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,"SunDisk SDCFB" ,13 )/* old SanDisk */ + || !strncmp(id->model, "SanDisk SDCFB", 13) /* SanDisk */drivers/ide/ide-probe.c +0
-0|| !strncmp(id->model, "HAGIWARA HPC", 12) /* Hagiwara */ || !strncmp (id->model,"LEXAR ATA_FLASH" ,15 )/* Lexar */ || !strncmp(id->model, "ATA_FLASH", 9)) /* Simple Tech */
Quoted 1 line
Some time ago I sent mail to Meelis asking if this patch is really necessary.
Oops, it must have been our university's mail server havein breakfast of my mail again :(
Quoted 1 line
Does this mean that CF test fail or that SunDisk is SanDisk now?
Just that SunDisk is now SanDisk. The patch was developed in 2.4 to quieten flash disk detection messages. The important part was about host protected area detection that is already different in 2.6 (*). In addition, the name change was noticed and fixed. It resulted in different display (not ATA but CFA) and told the ide layer that the disk does not have door locking but I don't know whether it actually changes some important behaviour.
Quoted 3 lines
id->config==0x848atest was introduced in kernel 2.3.27 _after_ SunDisk model name test and ifid->config==0x848atest fails comment todrive_is_flashcard()needs fixing.
I don't have the hardware currently at hand but I can let people who have test it. I only know for sure that it changes the display of "ATA" to "CFA" in 2.4.22 where the patch was developed. This was before the patch:
hda: SanDisk SDP3B-64, ATA DISK drive
(*) The host protected area fix for 2.4 was to do idedisk_read_native_max_address(drive) only when idedisk_supports_host_protected_area(drive) was true. By my quick look it seemed that 2.6 already does this check in init_idedisk_capacity() and 2.6 does not need the other patch - am I right here?
Signature · 1 line
Meelis Roos ([email protected])
Quoted 9 lines · Meelis Roos
Quoted 1 line
Does this mean that CF test fail or that SunDisk is SanDisk now?
Just that SunDisk is now SanDisk. The patch was developed in 2.4 to quieten flash disk detection messages. The important part was about host protected area detection that is already different in 2.6 (*). In addition, the name change was noticed and fixed. It resulted in different display (not ATA but CFA) and told the ide layer that the disk does not have door locking but I don't know whether it actually changes some important behaviour.
Ok, so this patch is indeed needed.
Quoted 5 lines
(*) The host protected area fix for 2.4 was to do
idedisk_read_native_max_address(drive)only whenidedisk_supports_host_protected_area(drive)was true. By my quick look it seemed that 2.6 already does this check ininit_idedisk_capacity()and 2.6 does not need the other patch - am I right here?
Yes.
Cheers,
Bartlomiej