9b38ee4ce63af50a5b022b3865c5c8d15800d999
[openwrt/svn-archive/archive.git] / target / linux / generic / patches-2.6.37 / 089-mtd-samsung-flash.patch
1 --- a/drivers/mtd/chips/cfi_cmdset_0002.c
2 +++ b/drivers/mtd/chips/cfi_cmdset_0002.c
3 @@ -394,9 +394,33 @@ static void cfi_fixup_major_minor(struct
4 {
5 // manufacturers defined in include/linux/mtd/cfi.h
6
7 - if (cfi->mfr == CFI_MFR_SAMSUNG && cfi->id == 0x257e &&
8 - extp->MajorVersion == '0')
9 + if (cfi->mfr == CFI_MFR_SAMSUNG &&
10 + extp->MajorVersion == '0') {
11 + printk(" Fixed Samsung's Amd/Fujitsu Extended Query version from %c.%c",
12 + extp->MajorVersion, extp->MinorVersion);
13 +
14 extp->MajorVersion = '1';
15 + extp->MinorVersion = '0';
16 +
17 + printk(" to %c.%c.\n",
18 + extp->MajorVersion, extp->MinorVersion);
19 + }
20 +
21 + if (cfi->mfr == CFI_MFR_SAMSUNG &&
22 + extp->MajorVersion == '3' && extp->MinorVersion == '3') {
23 + printk(KERN_NOTICE " Newer Samsung flash detected, "
24 + "should be compatibile with Amd/Fujitsu.\n");
25 +
26 + printk(" Fixed Samsung's Amd/Fujitsu Extended Query version from %c.%c",
27 + extp->MajorVersion, extp->MinorVersion);
28 +
29 + extp->MajorVersion = '1'; // set to 1.3 (last defined version)
30 + extp->MinorVersion = '3';
31 +
32 + printk(" to %c.%c.\n",
33 + extp->MajorVersion, extp->MinorVersion);
34 + }
35 +
36 /*
37 * SST 38VF640x chips report major=0xFF / minor=0xFF.
38 */