Wrong CFI offset in cfi_cmdset_0001.c

Josh Boyer jdub at us.ibm.com
Thu Oct 20 10:37:33 EDT 2005


Hi,

Support for Extended Query Table version 1.4 was added to
cfi_cmdset_0001.c recent.  For the most part it works, however I'm
seeing it detect an incorrect number of hardware partitions on an Intel
P30 chip.  Adding some debug printks showed it reported 7, which is
incorrect for this chip.

Digging through the code, I noticed the following lines:

		/* Burst Read info */
		extra_size += (extp->MinorVersion < '4') ? 6 : 5;

I think the values to be used are reversed here.  Version 1.4 of the
extended query table shows that the Burst Read info spans 6 bytes,
whereas the above code results in a value of 5 being used.  This also
accounts for the incorrect 7 value I'm seeing, since the last byte of
the burst read info is 7.

Nico, could you confirm whether this is a bug or not?

thx,
josh





More information about the linux-mtd mailing list