Thread (19 messages) flat view 19 messages, 9 authors, 2009-08-21

Re: [U-Boot] NAND ECC Error with wrong SMC ording bug

From: vimal singh <hidden>
Date: 2009-08-21 05:17:31
Also in: u-boot

<snip>
quoted hunk ↗ jump to hunk
With the current ndfc code, the error correction gets the bits wrong.
Switching it back to the original way and the correction is correct.
diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c
index 89bf85a..497e175 100644
--- a/drivers/mtd/nand/ndfc.c
+++ b/drivers/mtd/nand/ndfc.c
@@ -101,9 +101,8 @@ static int ndfc_calculate_ecc(struct mtd_info *mtd,
=A0 =A0 =A0 =A0wmb();
=A0 =A0 =A0 =A0ecc =3D in_be32(ndfc->ndfcbase + NDFC_ECC);
- =A0 =A0 =A0 /* The NDFC uses Smart Media (SMC) bytes order */
- =A0 =A0 =A0 ecc_code[0] =3D p[2];
- =A0 =A0 =A0 ecc_code[1] =3D p[1];
+ =A0 =A0 =A0 ecc_code[0] =3D p[1];
+ =A0 =A0 =A0 ecc_code[1] =3D p[2];
=A0 =A0 =A0 =A0ecc_code[2] =3D p[3];

=A0 =A0 =A0 =A0return 0;

Does anybody see a problem with my method of reproducing the bug? This
bug is deadly for our customers. I don't want to make the change unless
it is absolutely necessary..
Just one question: did you enabled MTD_NAND_ECC_SMC in configs?

-vimal
Cheers,
=A0 Sean

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help