2004-04-13 19:53:59

by Adrian Bunk

[permalink] [raw]
Subject: [2.4 IDE PATCH] 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 =====
--- 1.21/drivers/ide/ide-probe.c Mon Nov 24 00:05:18 2003
+++ edited/drivers/ide/ide-probe.c Thu Apr 1 21:15:22 2004
@@ -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 */

--
Meelis Roos ([email protected])



Subject: Re: [2.4 IDE PATCH] SanDisk is flash (fwd)

On Tuesday 13 of April 2004 21:53, Adrian Bunk wrote:
> 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.

> 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.

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.

> ===== drivers/ide/ide-probe.c 1.21 vs edited =====
> --- 1.21/drivers/ide/ide-probe.c Mon Nov 24 00:05:18 2003
> +++ edited/drivers/ide/ide-probe.c Thu Apr 1 21:15:22 2004
> @@ -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 */

2004-04-14 08:44:34

by Meelis Roos

[permalink] [raw]
Subject: Re: [2.4 IDE PATCH] SanDisk is flash (fwd)

> 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 :(

> 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.

> 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.

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?

--
Meelis Roos ([email protected])

Subject: Re: [2.4 IDE PATCH] SanDisk is flash (fwd)

On Wednesday 14 of April 2004 10:31, Meelis Roos wrote:
> > 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.

> (*) 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?

Yes.

Cheers,
Bartlomiej