[U-Boot] jffs2: ECC corrected nand data is ignored
Tom Rini
trini at konsulko.com
Tue Oct 17 00:47:38 UTC 2017
On Tue, Oct 10, 2017 at 02:20:55PM +0000, Engling, Uwe wrote:
> Hello,
>
> I ran into a problem with the JFFS2 filesystem driver implemented in U-Boot.
>
> I've got a NAND device that has correctable ECC errors (corrected somewhere in mtd/nand/nand_base.c).
> The NAND driver tells the filesystem layer (jffs2_1pass.c) above that there occurred correctable ECC errors and returns with a "value > 0".
> The JFFS2 driver recognizes the corrected ECC errors as real error and skips this block because the only accepts a "return value == 0" as correct.
>
> This problem exists for over 8 years (I checked version 2010.09) so I'm a little bit worried that I interpreted something wrong or didn't get the whole context.
>
> Can someone confirm this bug (and the bugfix) in the u-boot jffs2 driver?
>
> There was a mail in 2012 that mentioned the same problem, but there was no patch:
> http://u-boot.10912.n7.nabble.com/JFFS2-seems-to-drop-nand-data-with-ECC-corrections-td142008.html
> Sometime after this discussion the return value of nand_read() changed from -EUCLEAN as correctable ECC error to a positive value with the count of ECC corrected errors.
>
>
>
>
> With kind reguards,
> Uwe Engling
>
> diff --git a/fs/jffs2/jffs2_1pass.c b/fs/jffs2/jffs2_1pass.c
> index 4c6dfbf..6bf1943 100644
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171016/909ac494/attachment.sig>
More information about the U-Boot
mailing list