Date:2010-08-10 22:23:40 (2 years 10 months ago)
Author:florian
Commit:9f39c015a8776a671d2ebf3ceb93a83249ed1045
Message:[kernel] rename 014-samsung_flash patch to a better name, thanks maddes

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22587 3c298f89-4303-0410-b956-a3cf2f4a3e73
Files: target/linux/generic/patches-2.6.30/014-cfi_fix_amd_extended_table_check.patch (1 diff)
target/linux/generic/patches-2.6.30/014-samsung_flash (1 diff)
target/linux/generic/patches-2.6.31/014-cfi_fix_amd_extended_table_check.patch (1 diff)
target/linux/generic/patches-2.6.31/014-samsung_flash (1 diff)
target/linux/generic/patches-2.6.32/014-cfi_fix_amd_extended_table_check.patch (1 diff)
target/linux/generic/patches-2.6.32/014-samsung_flash.patch (1 diff)
target/linux/generic/patches-2.6.33/014-cfi_fix_amd_extended_table_check.patch (1 diff)
target/linux/generic/patches-2.6.33/014-samsung_flash.patch (1 diff)
target/linux/generic/patches-2.6.34/014-cfi_fix_amd_extended_table_check.patch (1 diff)
target/linux/generic/patches-2.6.34/014-samsung_flash.patch (1 diff)
target/linux/generic/patches-2.6.35/014-cfi_fix_amd_extended_table_check.patch (1 diff)
target/linux/generic/patches-2.6.35/014-samsung_flash.patch (1 diff)

Change Details

target/linux/generic/patches-2.6.30/014-cfi_fix_amd_extended_table_check.patch
1--- a/drivers/mtd/chips/cfi_cmdset_0002.c
2@@ -51,6 +51,7 @@
3 #define SST49LF040B 0x0050
4 #define SST49LF008A 0x005a
5 #define AT49BV6416 0x00d6
6+#define MANUFACTURER_SAMSUNG 0x00ec
7
8 static int cfi_amdstd_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *);
9 static int cfi_amdstd_write_words(struct mtd_info *, loff_t, size_t, size_t *, const u_char *);
10@@ -386,12 +387,19 @@ struct mtd_info *cfi_cmdset_0002(struct
11
12         if (extp->MajorVersion != '1' ||
13             (extp->MinorVersion < '0' || extp->MinorVersion > '4')) {
14- printk(KERN_ERR " Unknown Amd/Fujitsu Extended Query "
15- "version %c.%c.\n", extp->MajorVersion,
16- extp->MinorVersion);
17- kfree(extp);
18- kfree(mtd);
19- return NULL;
20+ if (cfi->mfr == MANUFACTURER_SAMSUNG &&
21+ (extp->MajorVersion == '3' && extp->MinorVersion == '3')) {
22+ printk(KERN_NOTICE " Newer Samsung flash detected, "
23+ "should be compatibile with Amd/Fujitsu.\n");
24+ }
25+ else {
26+ printk(KERN_ERR " Unknown Amd/Fujitsu Extended Query "
27+ "version %c.%c.\n", extp->MajorVersion,
28+ extp->MinorVersion);
29+ kfree(extp);
30+ kfree(mtd);
31+ return NULL;
32+ }
33         }
34
35         /* Install our own private info structure */
target/linux/generic/patches-2.6.30/014-samsung_flash
1+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
2@@ -51,6 +51,7 @@
3 #define SST49LF040B 0x0050
4 #define SST49LF008A 0x005a
5 #define AT49BV6416 0x00d6
6+#define MANUFACTURER_SAMSUNG 0x00ec
7
8 static int cfi_amdstd_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *);
9 static int cfi_amdstd_write_words(struct mtd_info *, loff_t, size_t, size_t *, const u_char *);
10@@ -386,12 +387,19 @@ struct mtd_info *cfi_cmdset_0002(struct
11
12         if (extp->MajorVersion != '1' ||
13             (extp->MinorVersion < '0' || extp->MinorVersion > '4')) {
14- printk(KERN_ERR " Unknown Amd/Fujitsu Extended Query "
15- "version %c.%c.\n", extp->MajorVersion,
16- extp->MinorVersion);
17- kfree(extp);
18- kfree(mtd);
19- return NULL;
20+ if (cfi->mfr == MANUFACTURER_SAMSUNG &&
21+ (extp->MajorVersion == '3' && extp->MinorVersion == '3')) {
22+ printk(KERN_NOTICE " Newer Samsung flash detected, "
23+ "should be compatibile with Amd/Fujitsu.\n");
24+ }
25+ else {
26+ printk(KERN_ERR " Unknown Amd/Fujitsu Extended Query "
27+ "version %c.%c.\n", extp->MajorVersion,
28+ extp->MinorVersion);
29+ kfree(extp);
30+ kfree(mtd);
31+ return NULL;
32+ }
33         }
34
35         /* Install our own private info structure */
target/linux/generic/patches-2.6.31/014-cfi_fix_amd_extended_table_check.patch
1--- a/drivers/mtd/chips/cfi_cmdset_0002.c
2@@ -51,6 +51,7 @@
3 #define SST49LF040B 0x0050
4 #define SST49LF008A 0x005a
5 #define AT49BV6416 0x00d6
6+#define MANUFACTURER_SAMSUNG 0x00ec
7
8 static int cfi_amdstd_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *);
9 static int cfi_amdstd_write_words(struct mtd_info *, loff_t, size_t, size_t *, const u_char *);
10@@ -375,12 +376,19 @@ struct mtd_info *cfi_cmdset_0002(struct
11
12         if (extp->MajorVersion != '1' ||
13             (extp->MinorVersion < '0' || extp->MinorVersion > '4')) {
14- printk(KERN_ERR " Unknown Amd/Fujitsu Extended Query "
15- "version %c.%c.\n", extp->MajorVersion,
16- extp->MinorVersion);
17- kfree(extp);
18- kfree(mtd);
19- return NULL;
20+ if (cfi->mfr == MANUFACTURER_SAMSUNG &&
21+ (extp->MajorVersion == '3' && extp->MinorVersion == '3')) {
22+ printk(KERN_NOTICE " Newer Samsung flash detected, "
23+ "should be compatibile with Amd/Fujitsu.\n");
24+ }
25+ else {
26+ printk(KERN_ERR " Unknown Amd/Fujitsu Extended Query "
27+ "version %c.%c.\n", extp->MajorVersion,
28+ extp->MinorVersion);
29+ kfree(extp);
30+ kfree(mtd);
31+ return NULL;
32+ }
33         }
34
35         /* Install our own private info structure */
target/linux/generic/patches-2.6.31/014-samsung_flash
1+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
2@@ -51,6 +51,7 @@
3 #define SST49LF040B 0x0050
4 #define SST49LF008A 0x005a
5 #define AT49BV6416 0x00d6
6+#define MANUFACTURER_SAMSUNG 0x00ec
7
8 static int cfi_amdstd_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *);
9 static int cfi_amdstd_write_words(struct mtd_info *, loff_t, size_t, size_t *, const u_char *);
10@@ -375,12 +376,19 @@ struct mtd_info *cfi_cmdset_0002(struct
11
12         if (extp->MajorVersion != '1' ||
13             (extp->MinorVersion < '0' || extp->MinorVersion > '4')) {
14- printk(KERN_ERR " Unknown Amd/Fujitsu Extended Query "
15- "version %c.%c.\n", extp->MajorVersion,
16- extp->MinorVersion);
17- kfree(extp);
18- kfree(mtd);
19- return NULL;
20+ if (cfi->mfr == MANUFACTURER_SAMSUNG &&
21+ (extp->MajorVersion == '3' && extp->MinorVersion == '3')) {
22+ printk(KERN_NOTICE " Newer Samsung flash detected, "
23+ "should be compatibile with Amd/Fujitsu.\n");
24+ }
25+ else {
26+ printk(KERN_ERR " Unknown Amd/Fujitsu Extended Query "
27+ "version %c.%c.\n", extp->MajorVersion,
28+ extp->MinorVersion);
29+ kfree(extp);
30+ kfree(mtd);
31+ return NULL;
32+ }
33         }
34
35         /* Install our own private info structure */
target/linux/generic/patches-2.6.32/014-cfi_fix_amd_extended_table_check.patch
1--- a/drivers/mtd/chips/cfi_cmdset_0002.c
2@@ -325,6 +325,8 @@ static struct cfi_fixup fixup_table[] =
3 static void cfi_fixup_major_minor(struct cfi_private *cfi,
4                   struct cfi_pri_amdstd *extp)
5 {
6+ // manufacturers defined in include/linux/mtd/cfi.h
7+
8     if (cfi->mfr == CFI_MFR_SAMSUNG && cfi->id == 0x257e &&
9         extp->MajorVersion == '0')
10         extp->MajorVersion = '1';
11@@ -355,6 +357,9 @@ struct mtd_info *cfi_cmdset_0002(struct
12     mtd->name = map->name;
13     mtd->writesize = 1;
14
15+ printk(" CFI mfr 0x%08x\n", cfi->mfr); // TODO: Is there a more general place to print this info?
16+ printk(" CFI id 0x%08x\n", cfi->id);
17+
18     if (cfi->cfi_mode==CFI_MODE_CFI){
19         unsigned char bootloc;
20         /*
21@@ -373,16 +378,24 @@ struct mtd_info *cfi_cmdset_0002(struct
22
23         cfi_fixup_major_minor(cfi, extp);
24
25- if (extp->MajorVersion != '1' ||
26- (extp->MinorVersion < '0' || extp->MinorVersion > '4')) {
27+ // valid primary extension versions are: 1.0, 1.1, 1.2, 1.3
28+ // see: http://www.amd.com/us-en/assets/content_type/DownloadableAssets/cfi_r20.pdf, page 19 and on
29+ // http://www.amd.com/us-en/assets/content_type/DownloadableAssets/cfi_100_20011201.pdf
30+ if (extp->MajorVersion < '1' ||
31+ extp->MajorVersion > '1' ||
32+ (extp->MajorVersion == '1' && ( extp->MinorVersion < '0' || extp->MinorVersion > '3'))) {
33             printk(KERN_ERR " Unknown Amd/Fujitsu Extended Query "
34- "version %c.%c.\n", extp->MajorVersion,
35- extp->MinorVersion);
36+ "version %c.%c (0x%02x/0x%02x).\n",
37+ extp->MajorVersion, extp->MinorVersion,
38+ extp->MajorVersion, extp->MinorVersion);
39             kfree(extp);
40             kfree(mtd);
41             return NULL;
42         }
43
44+ printk(" Amd/Fujitsu Extended Query version %c.%c.\n",
45+ extp->MajorVersion, extp->MinorVersion);
46+
47         /* Install our own private info structure */
48         cfi->cmdset_priv = extp;
49
target/linux/generic/patches-2.6.32/014-samsung_flash.patch
1+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
2@@ -325,6 +325,8 @@ static struct cfi_fixup fixup_table[] =
3 static void cfi_fixup_major_minor(struct cfi_private *cfi,
4                   struct cfi_pri_amdstd *extp)
5 {
6+ // manufacturers defined in include/linux/mtd/cfi.h
7+
8     if (cfi->mfr == CFI_MFR_SAMSUNG && cfi->id == 0x257e &&
9         extp->MajorVersion == '0')
10         extp->MajorVersion = '1';
11@@ -355,6 +357,9 @@ struct mtd_info *cfi_cmdset_0002(struct
12     mtd->name = map->name;
13     mtd->writesize = 1;
14
15+ printk(" CFI mfr 0x%08x\n", cfi->mfr); // TODO: Is there a more general place to print this info?
16+ printk(" CFI id 0x%08x\n", cfi->id);
17+
18     if (cfi->cfi_mode==CFI_MODE_CFI){
19         unsigned char bootloc;
20         /*
21@@ -373,16 +378,24 @@ struct mtd_info *cfi_cmdset_0002(struct
22
23         cfi_fixup_major_minor(cfi, extp);
24
25- if (extp->MajorVersion != '1' ||
26- (extp->MinorVersion < '0' || extp->MinorVersion > '4')) {
27+ // valid primary extension versions are: 1.0, 1.1, 1.2, 1.3
28+ // see: http://www.amd.com/us-en/assets/content_type/DownloadableAssets/cfi_r20.pdf, page 19 and on
29+ // http://www.amd.com/us-en/assets/content_type/DownloadableAssets/cfi_100_20011201.pdf
30+ if (extp->MajorVersion < '1' ||
31+ extp->MajorVersion > '1' ||
32+ (extp->MajorVersion == '1' && ( extp->MinorVersion < '0' || extp->MinorVersion > '3'))) {
33             printk(KERN_ERR " Unknown Amd/Fujitsu Extended Query "
34- "version %c.%c.\n", extp->MajorVersion,
35- extp->MinorVersion);
36+ "version %c.%c (0x%02x/0x%02x).\n",
37+ extp->MajorVersion, extp->MinorVersion,
38+ extp->MajorVersion, extp->MinorVersion);
39             kfree(extp);
40             kfree(mtd);
41             return NULL;
42         }
43
44+ printk(" Amd/Fujitsu Extended Query version %c.%c.\n",
45+ extp->MajorVersion, extp->MinorVersion);
46+
47         /* Install our own private info structure */
48         cfi->cmdset_priv = extp;
49
target/linux/generic/patches-2.6.33/014-cfi_fix_amd_extended_table_check.patch
1--- a/drivers/mtd/chips/cfi_cmdset_0002.c
2@@ -325,6 +325,8 @@ static struct cfi_fixup fixup_table[] =
3 static void cfi_fixup_major_minor(struct cfi_private *cfi,
4                   struct cfi_pri_amdstd *extp)
5 {
6+ // manufacturers defined in include/linux/mtd/cfi.h
7+
8     if (cfi->mfr == CFI_MFR_SAMSUNG && cfi->id == 0x257e &&
9         extp->MajorVersion == '0')
10         extp->MajorVersion = '1';
11@@ -355,6 +357,9 @@ struct mtd_info *cfi_cmdset_0002(struct
12     mtd->name = map->name;
13     mtd->writesize = 1;
14
15+ printk(" CFI mfr 0x%08x\n", cfi->mfr); // TODO: Is there a more general place to print this info?
16+ printk(" CFI id 0x%08x\n", cfi->id);
17+
18     if (cfi->cfi_mode==CFI_MODE_CFI){
19         unsigned char bootloc;
20         /*
21@@ -373,16 +378,24 @@ struct mtd_info *cfi_cmdset_0002(struct
22
23         cfi_fixup_major_minor(cfi, extp);
24
25- if (extp->MajorVersion != '1' ||
26- (extp->MinorVersion < '0' || extp->MinorVersion > '4')) {
27+ // valid primary extension versions are: 1.0, 1.1, 1.2, 1.3
28+ // see: http://www.amd.com/us-en/assets/content_type/DownloadableAssets/cfi_r20.pdf, page 19 and on
29+ // http://www.amd.com/us-en/assets/content_type/DownloadableAssets/cfi_100_20011201.pdf
30+ if (extp->MajorVersion < '1' ||
31+ extp->MajorVersion > '1' ||
32+ (extp->MajorVersion == '1' && ( extp->MinorVersion < '0' || extp->MinorVersion > '3'))) {
33             printk(KERN_ERR " Unknown Amd/Fujitsu Extended Query "
34- "version %c.%c.\n", extp->MajorVersion,
35- extp->MinorVersion);
36+ "version %c.%c (0x%02x/0x%02x).\n",
37+ extp->MajorVersion, extp->MinorVersion,
38+ extp->MajorVersion, extp->MinorVersion);
39             kfree(extp);
40             kfree(mtd);
41             return NULL;
42         }
43
44+ printk(" Amd/Fujitsu Extended Query version %c.%c.\n",
45+ extp->MajorVersion, extp->MinorVersion);
46+
47         /* Install our own private info structure */
48         cfi->cmdset_priv = extp;
49
target/linux/generic/patches-2.6.33/014-samsung_flash.patch
1+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
2@@ -325,6 +325,8 @@ static struct cfi_fixup fixup_table[] =
3 static void cfi_fixup_major_minor(struct cfi_private *cfi,
4                   struct cfi_pri_amdstd *extp)
5 {
6+ // manufacturers defined in include/linux/mtd/cfi.h
7+
8     if (cfi->mfr == CFI_MFR_SAMSUNG && cfi->id == 0x257e &&
9         extp->MajorVersion == '0')
10         extp->MajorVersion = '1';
11@@ -355,6 +357,9 @@ struct mtd_info *cfi_cmdset_0002(struct
12     mtd->name = map->name;
13     mtd->writesize = 1;
14
15+ printk(" CFI mfr 0x%08x\n", cfi->mfr); // TODO: Is there a more general place to print this info?
16+ printk(" CFI id 0x%08x\n", cfi->id);
17+
18     if (cfi->cfi_mode==CFI_MODE_CFI){
19         unsigned char bootloc;
20         /*
21@@ -373,16 +378,24 @@ struct mtd_info *cfi_cmdset_0002(struct
22
23         cfi_fixup_major_minor(cfi, extp);
24
25- if (extp->MajorVersion != '1' ||
26- (extp->MinorVersion < '0' || extp->MinorVersion > '4')) {
27+ // valid primary extension versions are: 1.0, 1.1, 1.2, 1.3
28+ // see: http://www.amd.com/us-en/assets/content_type/DownloadableAssets/cfi_r20.pdf, page 19 and on
29+ // http://www.amd.com/us-en/assets/content_type/DownloadableAssets/cfi_100_20011201.pdf
30+ if (extp->MajorVersion < '1' ||
31+ extp->MajorVersion > '1' ||
32+ (extp->MajorVersion == '1' && ( extp->MinorVersion < '0' || extp->MinorVersion > '3'))) {
33             printk(KERN_ERR " Unknown Amd/Fujitsu Extended Query "
34- "version %c.%c.\n", extp->MajorVersion,
35- extp->MinorVersion);
36+ "version %c.%c (0x%02x/0x%02x).\n",
37+ extp->MajorVersion, extp->MinorVersion,
38+ extp->MajorVersion, extp->MinorVersion);
39             kfree(extp);
40             kfree(mtd);
41             return NULL;
42         }
43
44+ printk(" Amd/Fujitsu Extended Query version %c.%c.\n",
45+ extp->MajorVersion, extp->MinorVersion);
46+
47         /* Install our own private info structure */
48         cfi->cmdset_priv = extp;
49
target/linux/generic/patches-2.6.34/014-cfi_fix_amd_extended_table_check.patch
1--- a/drivers/mtd/chips/cfi_cmdset_0002.c
2@@ -325,6 +325,8 @@ static struct cfi_fixup fixup_table[] =
3 static void cfi_fixup_major_minor(struct cfi_private *cfi,
4                   struct cfi_pri_amdstd *extp)
5 {
6+ // manufacturers defined in include/linux/mtd/cfi.h
7+
8     if (cfi->mfr == CFI_MFR_SAMSUNG && cfi->id == 0x257e &&
9         extp->MajorVersion == '0')
10         extp->MajorVersion = '1';
11@@ -355,6 +357,9 @@ struct mtd_info *cfi_cmdset_0002(struct
12     mtd->name = map->name;
13     mtd->writesize = 1;
14
15+ printk(" CFI mfr 0x%08x\n", cfi->mfr); // TODO: Is there a more general place to print this info?
16+ printk(" CFI id 0x%08x\n", cfi->id);
17+
18     if (cfi->cfi_mode==CFI_MODE_CFI){
19         unsigned char bootloc;
20         /*
21@@ -373,16 +378,24 @@ struct mtd_info *cfi_cmdset_0002(struct
22
23         cfi_fixup_major_minor(cfi, extp);
24
25- if (extp->MajorVersion != '1' ||
26- (extp->MinorVersion < '0' || extp->MinorVersion > '4')) {
27+ // valid primary extension versions are: 1.0, 1.1, 1.2, 1.3
28+ // see: http://www.amd.com/us-en/assets/content_type/DownloadableAssets/cfi_r20.pdf, page 19 and on
29+ // http://www.amd.com/us-en/assets/content_type/DownloadableAssets/cfi_100_20011201.pdf
30+ if (extp->MajorVersion < '1' ||
31+ extp->MajorVersion > '1' ||
32+ (extp->MajorVersion == '1' && ( extp->MinorVersion < '0' || extp->MinorVersion > '3'))) {
33             printk(KERN_ERR " Unknown Amd/Fujitsu Extended Query "
34- "version %c.%c.\n", extp->MajorVersion,
35- extp->MinorVersion);
36+ "version %c.%c (0x%02x/0x%02x).\n",
37+ extp->MajorVersion, extp->MinorVersion,
38+ extp->MajorVersion, extp->MinorVersion);
39             kfree(extp);
40             kfree(mtd);
41             return NULL;
42         }
43
44+ printk(" Amd/Fujitsu Extended Query version %c.%c.\n",
45+ extp->MajorVersion, extp->MinorVersion);
46+
47         /* Install our own private info structure */
48         cfi->cmdset_priv = extp;
49
target/linux/generic/patches-2.6.34/014-samsung_flash.patch
1+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
2@@ -325,6 +325,8 @@ static struct cfi_fixup fixup_table[] =
3 static void cfi_fixup_major_minor(struct cfi_private *cfi,
4                   struct cfi_pri_amdstd *extp)
5 {
6+ // manufacturers defined in include/linux/mtd/cfi.h
7+
8     if (cfi->mfr == CFI_MFR_SAMSUNG && cfi->id == 0x257e &&
9         extp->MajorVersion == '0')
10         extp->MajorVersion = '1';
11@@ -355,6 +357,9 @@ struct mtd_info *cfi_cmdset_0002(struct
12     mtd->name = map->name;
13     mtd->writesize = 1;
14
15+ printk(" CFI mfr 0x%08x\n", cfi->mfr); // TODO: Is there a more general place to print this info?
16+ printk(" CFI id 0x%08x\n", cfi->id);
17+
18     if (cfi->cfi_mode==CFI_MODE_CFI){
19         unsigned char bootloc;
20         /*
21@@ -373,16 +378,24 @@ struct mtd_info *cfi_cmdset_0002(struct
22
23         cfi_fixup_major_minor(cfi, extp);
24
25- if (extp->MajorVersion != '1' ||
26- (extp->MinorVersion < '0' || extp->MinorVersion > '4')) {
27+ // valid primary extension versions are: 1.0, 1.1, 1.2, 1.3
28+ // see: http://www.amd.com/us-en/assets/content_type/DownloadableAssets/cfi_r20.pdf, page 19 and on
29+ // http://www.amd.com/us-en/assets/content_type/DownloadableAssets/cfi_100_20011201.pdf
30+ if (extp->MajorVersion < '1' ||
31+ extp->MajorVersion > '1' ||
32+ (extp->MajorVersion == '1' && ( extp->MinorVersion < '0' || extp->MinorVersion > '3'))) {
33             printk(KERN_ERR " Unknown Amd/Fujitsu Extended Query "
34- "version %c.%c.\n", extp->MajorVersion,
35- extp->MinorVersion);
36+ "version %c.%c (0x%02x/0x%02x).\n",
37+ extp->MajorVersion, extp->MinorVersion,
38+ extp->MajorVersion, extp->MinorVersion);
39             kfree(extp);
40             kfree(mtd);
41             return NULL;
42         }
43
44+ printk(" Amd/Fujitsu Extended Query version %c.%c.\n",
45+ extp->MajorVersion, extp->MinorVersion);
46+
47         /* Install our own private info structure */
48         cfi->cmdset_priv = extp;
49
target/linux/generic/patches-2.6.35/014-cfi_fix_amd_extended_table_check.patch
1--- a/drivers/mtd/chips/cfi_cmdset_0002.c
2@@ -372,6 +372,8 @@ static struct cfi_fixup fixup_table[] =
3 static void cfi_fixup_major_minor(struct cfi_private *cfi,
4                   struct cfi_pri_amdstd *extp)
5 {
6+ // manufacturers defined in include/linux/mtd/cfi.h
7+
8     if (cfi->mfr == CFI_MFR_SAMSUNG && cfi->id == 0x257e &&
9         extp->MajorVersion == '0')
10         extp->MajorVersion = '1';
11@@ -404,6 +406,9 @@ struct mtd_info *cfi_cmdset_0002(struct
12
13     mtd->reboot_notifier.notifier_call = cfi_amdstd_reboot;
14
15+ printk(" CFI mfr 0x%08x\n", cfi->mfr); // TODO: Is there a more general place to print this info?
16+ printk(" CFI id 0x%08x\n", cfi->id);
17+
18     if (cfi->cfi_mode==CFI_MODE_CFI){
19         unsigned char bootloc;
20         __u16 adr = primary?cfi->cfiq->P_ADR:cfi->cfiq->A_ADR;
21@@ -417,16 +422,24 @@ struct mtd_info *cfi_cmdset_0002(struct
22              */
23             cfi_fixup_major_minor(cfi, extp);
24
25- if (extp->MajorVersion != '1' ||
26- (extp->MinorVersion < '0' || extp->MinorVersion > '4')) {
27+ // valid primary extension versions are: 1.0, 1.1, 1.2, 1.3
28+ // see: http://www.amd.com/us-en/assets/content_type/DownloadableAssets/cfi_r20.pdf, page 19 and on
29+ // http://www.amd.com/us-en/assets/content_type/DownloadableAssets/cfi_100_20011201.pdf
30+ if (extp->MajorVersion < '1' ||
31+ extp->MajorVersion > '1' ||
32+ (extp->MajorVersion == '1' && ( extp->MinorVersion < '0' || extp->MinorVersion > '3'))) {
33                 printk(KERN_ERR " Unknown Amd/Fujitsu Extended Query "
34- "version %c.%c.\n", extp->MajorVersion,
35- extp->MinorVersion);
36+ "version %c.%c (0x%02x/0x%02x).\n",
37+ extp->MajorVersion, extp->MinorVersion,
38+ extp->MajorVersion, extp->MinorVersion);
39                 kfree(extp);
40                 kfree(mtd);
41                 return NULL;
42             }
43
44+ printk(" Amd/Fujitsu Extended Query version %c.%c.\n",
45+ extp->MajorVersion, extp->MinorVersion);
46+
47             /* Install our own private info structure */
48             cfi->cmdset_priv = extp;
49
target/linux/generic/patches-2.6.35/014-samsung_flash.patch
1+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
2@@ -372,6 +372,8 @@ static struct cfi_fixup fixup_table[] =
3 static void cfi_fixup_major_minor(struct cfi_private *cfi,
4                   struct cfi_pri_amdstd *extp)
5 {
6+ // manufacturers defined in include/linux/mtd/cfi.h
7+
8     if (cfi->mfr == CFI_MFR_SAMSUNG && cfi->id == 0x257e &&
9         extp->MajorVersion == '0')
10         extp->MajorVersion = '1';
11@@ -404,6 +406,9 @@ struct mtd_info *cfi_cmdset_0002(struct
12
13     mtd->reboot_notifier.notifier_call = cfi_amdstd_reboot;
14
15+ printk(" CFI mfr 0x%08x\n", cfi->mfr); // TODO: Is there a more general place to print this info?
16+ printk(" CFI id 0x%08x\n", cfi->id);
17+
18     if (cfi->cfi_mode==CFI_MODE_CFI){
19         unsigned char bootloc;
20         __u16 adr = primary?cfi->cfiq->P_ADR:cfi->cfiq->A_ADR;
21@@ -417,16 +422,24 @@ struct mtd_info *cfi_cmdset_0002(struct
22              */
23             cfi_fixup_major_minor(cfi, extp);
24
25- if (extp->MajorVersion != '1' ||
26- (extp->MinorVersion < '0' || extp->MinorVersion > '4')) {
27+ // valid primary extension versions are: 1.0, 1.1, 1.2, 1.3
28+ // see: http://www.amd.com/us-en/assets/content_type/DownloadableAssets/cfi_r20.pdf, page 19 and on
29+ // http://www.amd.com/us-en/assets/content_type/DownloadableAssets/cfi_100_20011201.pdf
30+ if (extp->MajorVersion < '1' ||
31+ extp->MajorVersion > '1' ||
32+ (extp->MajorVersion == '1' && ( extp->MinorVersion < '0' || extp->MinorVersion > '3'))) {
33                 printk(KERN_ERR " Unknown Amd/Fujitsu Extended Query "
34- "version %c.%c.\n", extp->MajorVersion,
35- extp->MinorVersion);
36+ "version %c.%c (0x%02x/0x%02x).\n",
37+ extp->MajorVersion, extp->MinorVersion,
38+ extp->MajorVersion, extp->MinorVersion);
39                 kfree(extp);
40                 kfree(mtd);
41                 return NULL;
42             }
43
44+ printk(" Amd/Fujitsu Extended Query version %c.%c.\n",
45+ extp->MajorVersion, extp->MinorVersion);
46+
47             /* Install our own private info structure */
48             cfi->cmdset_priv = extp;
49

Archive Download the corresponding diff file



interactive