abuse of nand_correct_data in tmio_nand driver

Atsushi Nemoto anemo at mba.ocn.ne.jp
Sun Jul 19 11:14:26 EDT 2009


On Sun, 19 Jul 2009 04:11:27 +0400, Dmitry Eremin-Solenikov <dbaryshkov at gmail.com> wrote:
> > The current nand_correct_data() can be used for ecc.bytes = 3 case
> > only.  The tmio_nand driver uses ecc.bytes = 6.
> 
> IIRC, tmio_nand driver accesses two ecc "sectors" at once, so this is
> most probably ok. I'll look into it though, when I have some time.

Yes, tmio_nand driver read 512 byte data and calculate 6 byte ecc at
once, but nand_correct_data only references first 3 byte of ecc.

I doubt the driver cannot detect errors in the second 256 byte sector
of the 512 byte block.

---
Atsushi Nemoto



More information about the linux-mtd mailing list