93e371fa92f1a850b5dfc14ce2ab26d0273f1a9e
[openwrt.git] / target / linux / generic-2.6 / patches / 007-samsung_flash.patch
1 --- linux.old/drivers/mtd/chips/cfi_cmdset_0002.c 2006-10-23 21:14:11.618024794 +0200
2 +++ linux.dev/drivers/mtd/chips/cfi_cmdset_0002.c 2006-10-24 07:47:52.267007586 +0200
3 @@ -49,6 +49,7 @@
4 #define MANUFACTURER_SST 0x00BF
5 #define SST49LF004B 0x0060
6 #define SST49LF008A 0x005a
7 +#define MANUFACTURER_SAMSUNG 0x00ec
8
9 static int cfi_amdstd_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *);
10 static int cfi_amdstd_write_words(struct mtd_info *, loff_t, size_t, size_t *, const u_char *);
11 @@ -254,13 +255,20 @@
12 }
13
14 if (extp->MajorVersion != '1' ||
15 - (extp->MinorVersion < '0' || extp->MinorVersion > '4')) {
16 - printk(KERN_ERR " Unknown Amd/Fujitsu Extended Query "
17 - "version %c.%c.\n", extp->MajorVersion,
18 - extp->MinorVersion);
19 - kfree(extp);
20 - kfree(mtd);
21 - return NULL;
22 + (extp->MinorVersion < '0' || extp->MinorVersion > '4')) {
23 + if (cfi->mfr == MANUFACTURER_SAMSUNG &&
24 + (extp->MajorVersion == '3' && extp->MinorVersion == '3')) {
25 + printk(KERN_NOTICE " Newer Samsung flash detected, "
26 + "should be compatibile with Amd/Fujitsu.\n");
27 + }
28 + else {
29 + printk(KERN_ERR " Unknown Amd/Fujitsu Extended Query "
30 + "version %c.%c.\n", extp->MajorVersion,
31 + extp->MinorVersion);
32 + kfree(extp);
33 + kfree(mtd);
34 + return NULL;
35 + }
36 }
37
38 /* Install our own private info structure */
This page took 0.042956 seconds and 3 git commands to generate.