BUG in nand_base.c

Thomas Gleixner tglx at linutronix.de
Wed Oct 6 04:28:28 EDT 2004


On Wed, 2004-10-06 at 05:47, Brad Beveridge wrote:
> Hi all, I have been playing with large size nand devices & have found 
> what I think is a bug in nand_base.c::nand_command.  I have the latest 
> daily snapshot.
> Starting at line 546, there is the following code
>                         /* One more address cycle for higher density 
> devices */
>                         if (this->chipsize & 0x0c000000)
>                                 this->write_byte(mtd, (unsigned char) 
> ((page_addr >> 16) & 0x0f));
> Which will correctly trap the 4th write cycle for 64 & 128MiB parts, but 
> not for larger sizes of 256 & 512 MiB.
> In my code I have changed the line to read
>                         if (this->chipsize & 0xfc000000)
> 
> Also, I noticed that for the large page devices (nand_command_lp) a 
> proper compare (>) is used instead of a mask - should one of these be 
> changed to make both functions consistant?

You're right. I will fix this later when I have CVS access again.

Thanks
tglx







More information about the linux-mtd mailing list