diff options
Diffstat (limited to 'drivers/mtd/chips')
-rw-r--r-- | drivers/mtd/chips/cfi_cmdset_0002.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c index d81079ef91a5..749203f89b55 100644 --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c | |||
@@ -417,16 +417,25 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary) | |||
417 | */ | 417 | */ |
418 | cfi_fixup_major_minor(cfi, extp); | 418 | cfi_fixup_major_minor(cfi, extp); |
419 | 419 | ||
420 | /* | ||
421 | * Valid primary extension versions are: 1.0, 1.1, 1.2, 1.3 | ||
422 | * see: http://www.amd.com/us-en/assets/content_type/DownloadableAssets/cfi_r20.pdf, page 19 and on | ||
423 | * http://www.amd.com/us-en/assets/content_type/DownloadableAssets/cfi_100_20011201.pdf | ||
424 | */ | ||
420 | if (extp->MajorVersion != '1' || | 425 | if (extp->MajorVersion != '1' || |
421 | (extp->MinorVersion < '0' || extp->MinorVersion > '4')) { | 426 | (extp->MajorVersion == '1' && ( extp->MinorVersion < '0' || extp->MinorVersion > '3'))) { |
422 | printk(KERN_ERR " Unknown Amd/Fujitsu Extended Query " | 427 | printk(KERN_ERR " Unknown Amd/Fujitsu Extended Query " |
423 | "version %c.%c.\n", extp->MajorVersion, | 428 | "version %c.%c (%#02x/%#02x).\n", |
424 | extp->MinorVersion); | 429 | extp->MajorVersion, extp->MinorVersion, |
430 | extp->MajorVersion, extp->MinorVersion); | ||
425 | kfree(extp); | 431 | kfree(extp); |
426 | kfree(mtd); | 432 | kfree(mtd); |
427 | return NULL; | 433 | return NULL; |
428 | } | 434 | } |
429 | 435 | ||
436 | printk(KERN_INFO " Amd/Fujitsu Extended Query version %c.%c.\n", | ||
437 | extp->MajorVersion, extp->MinorVersion); | ||
438 | |||
430 | /* Install our own private info structure */ | 439 | /* Install our own private info structure */ |
431 | cfi->cmdset_priv = extp; | 440 | cfi->cmdset_priv = extp; |
432 | 441 | ||