cfi_cmdset_0002.c possible BUG (was Re: ST M29W320D incorrectly configured)

Corinna Schultz cschultz at linux.vnet.ibm.com
Thu Oct 30 16:33:26 EDT 2008


Quoting Corinna Schultz <cschultz at linux.vnet.ibm.com>:

> I'm having a problem getting the unlock addresses correctly configured
> for the ST M29W320D chip. CFI query data is shown below (from
> debugging statements I enabled and/or added to the driver). The chip
> is wired so that the #BYTE pin is low, putting the chip into x8 mode.
> The data bus is physically 8 bits.

OK, I understand things a bit better now. device_type is detected at  
runtime, and the constants are misleadingly named. They are scaling  
values, and in my case, (x16 chip in x8 mode) device_type should be 2,  
or CFI_DEVICETYPE_X16, which is what it is being detected as. My  
interfaceDesc is also 2 (x8/x16 async modes), as it should be. So far  
so good.

Given this, the conditional used to assign the unlock addresses seems  
to have logic errors. Here's the original patch:  
http://lists.infradead.org/pipermail/linux-mtd-cvs/2004-September/004096.html

Does anyone know the reasoning behind this change? Was this tested?  
Has anyone else reported problems with this code (it's pretty old)?


-Corinna Schultz
IBM LTC




More information about the linux-mtd mailing list