Article [#3977] Problem with minor version in cfi_cmdset_0001.c

[#3977] Problem with minor version in cfi_cmdset_0001.c

Submitted By: J.J. Krabbendam

Open Date

2008-03-19 04:41:52     Close Date

2008-03-19 04:52:10

Priority:

Medium     Assignee:

Nobody

Status:

Closed     Fixed In Release:

N/A

Found In Release:

N/A     Release:

Category:

N/A     Board:

N/A

Processor:

N/A     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:

Duplicate

Uboot version or rev.:

    Toolchain version or rev.:

App binary format:

N/A     

Summary: Problem with minor version in cfi_cmdset_0001.c

Details:

I have a NOR (burst flash) chip that (apparently) has version number 1.5 (major=1, minor=5).

The test in drivers/mtd/chips/cfi_cmdset_0001.c on the major/minor numbers of the chip fails because the test assumes that 4 is the highest minor number.

The corresponding error messages are:

====

physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank

Intel/Sharp Extended Query Table at 0x010A

  Unknown Intel/Sharp Extended Query version 1.5.

gen_probe: No supported Vendor Command Set found

physmap-flash physmap-flash.0: map_probe failed

====

To fix this, the high value for the minor number in the test should be incremented by one.

svn diff

Index: cfi_cmdset_0001.c

===================================================================

--- cfi_cmdset_0001.c   (revision 4396)

+++ cfi_cmdset_0001.c   (working copy)

@@ -278,7 +278,7 @@

                return NULL;

        if (extp->MajorVersion != '1' ||

-           (extp->MinorVersion < '0' || extp->MinorVersion > '4')) {

+           (extp->MinorVersion < '0' || extp->MinorVersion > '5')) {

                printk(KERN_ERR "  Unknown Intel/Sharp Extended Query "

                       "version %c.%c.\n",  extp->MajorVersion,

                       extp->MinorVersion);

Follow-ups

--- Mike Frysinger                                           2008-03-19 04:52:10

the test is there for a reason ... to make sure all of the required

functionality is implemented.  incrementing the # without verification isnt a

good idea.

dupe of [#3851]

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

File Name     File Type     File Size     Posted By

No Files Were Found

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.