Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 153791
b: refs/heads/master
c: ec2d0d8
h: refs/heads/master
i:
  153789: bb01374
  153787: 3dc2692
  153783: 946a3ec
  153775: 4cfc48d
  153759: 5064963
  153727: 79896b6
v: v3
  • Loading branch information
Daniel Ribeiro authored and David Woodhouse committed Jun 5, 2009
1 parent 3a8443c commit 5694723
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d6fed9e9fc5eefae5be0ecf222bac7e7496e8e74
refs/heads/master: ec2d0d842577854eee18f0dc06bd48fe17189b54
12 changes: 12 additions & 0 deletions trunk/drivers/mtd/chips/cfi_cmdset_0001.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#define MANUFACTURER_INTEL 0x0089
#define I82802AB 0x00ad
#define I82802AC 0x00ac
#define PF38F4476 0x881c
#define MANUFACTURER_ST 0x0020
#define M50LPW080 0x002F
#define M50FLW080A 0x0080
Expand Down Expand Up @@ -315,9 +316,18 @@ static struct cfi_fixup fixup_table[] = {
{ 0, 0, NULL, NULL }
};

static void cfi_fixup_major_minor(struct cfi_private *cfi,
struct cfi_pri_intelext *extp)
{
if (cfi->mfr == MANUFACTURER_INTEL &&
cfi->id == PF38F4476 && extp->MinorVersion == '3')
extp->MinorVersion = '1';
}

static inline struct cfi_pri_intelext *
read_pri_intelext(struct map_info *map, __u16 adr)
{
struct cfi_private *cfi = map->fldrv_priv;
struct cfi_pri_intelext *extp;
unsigned int extp_size = sizeof(*extp);

Expand All @@ -326,6 +336,8 @@ read_pri_intelext(struct map_info *map, __u16 adr)
if (!extp)
return NULL;

cfi_fixup_major_minor(cfi, extp);

if (extp->MajorVersion != '1' ||
(extp->MinorVersion < '0' || extp->MinorVersion > '5')) {
printk(KERN_ERR " Unknown Intel/Sharp Extended Query "
Expand Down

0 comments on commit 5694723

Please sign in to comment.