HW ECC correction error on LB60.

Lars-Peter Clausen lars at metafoo.de
Wed Sep 16 15:45:11 EDT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

ZhangJieJing wrote:
> Hi Everyone,
>
> I found that my board(LB60) have ECC error with NAND flash, kernel will
> continue dumping message like [1] forever.
>
Hi

I did some investigation on the nand ecc issue today:
The image is usually padded with 0xff bytes up to the eraseblock size.
Depending on the image size this can fill whole pages. When flashing
the image and writing a page usbboot will calculate the ecc data even
for those pages filled 0xff and write it to the oob section of that page.

Now, when the linux kernel mounts the image it thinks that these pages
containing only 0xff are empty and can be written to without being
haved erased before.
So if data is written to such a page the ecc data for that page will
be written ontop of the ecc data, which was previously written while
flashing the image. Due to the nature of nand chips this will result
in wrong ecc data and on the next read from that page it will show ecc
errors.

To fix it I wrote a simple patch[1] for usbboot which skips empty
pages during write. So far I haven't seen a single ecc error.
Xiangfu could you please apply that patch? (Or grant me commit access
to usbboot)

- Lars

[1] http://metafoo.de/usbboot_dont_flash_empty_pages.patch
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkqxQDEACgkQBX4mSR26RiNP2QCePXDwSAiHRjzDt0eQCXgS7HQj
81gAmwcfl4TCGZe3S6gXiSjt4HrTBDHX
=E+KA
-----END PGP SIGNATURE-----





More information about the discussion mailing list


interactive