target/linux: revert r24014 (further testing is needed)
[openwrt.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 -               extp->MajorVersion = '1';
10 +       if (cfi->mfr == CFI_MFR_SAMSUNG &&
11 +               extp->MajorVersion == '0') {
12 +                       printk("  Fixed Samsung's Amd/Fujitsu Extended Query version from %c.%c",
13 +                               extp->MajorVersion, extp->MinorVersion);
14 +
15 +                       extp->MajorVersion = '1';
16 +                       extp->MinorVersion = '0';
17 +
18 +                       printk(" to %c.%c.\n",
19 +                               extp->MajorVersion, extp->MinorVersion);
20 +       }
21 +
22 +       if (cfi->mfr == CFI_MFR_SAMSUNG &&
23 +               extp->MajorVersion == '3' && extp->MinorVersion == '3') {
24 +                       printk(KERN_NOTICE "  Newer Samsung flash detected, "
25 +                               "should be compatibile with Amd/Fujitsu.\n");
26 +
27 +                       printk("  Fixed Samsung's Amd/Fujitsu Extended Query version from %c.%c",
28 +                               extp->MajorVersion, extp->MinorVersion);
29 +
30 +                       extp->MajorVersion = '1';       // set to 1.3 (last defined version)
31 +                       extp->MinorVersion = '3';
32 +
33 +                       printk(" to %c.%c.\n",
34 +                               extp->MajorVersion, extp->MinorVersion);
35 +       }
36 +
37         /*
38          * SST 38VF640x chips report major=0xFF / minor=0xFF.
39          */