Hi Boris,
Boris Brezillon boris.brezillon@bootlin.com wrote on Tue, 4 Sep 2018 11:14:38 +0200:
Apparently ECC bytes are not ordered as expected by nand_correct_data() in the ecc_calc buffer which leads to invalid bitflip correction when an ECC error is detected (can be reproduced with 'nandbiterrs -i').
Re-ordering ECC bytes seems to fix the problem.
While at it, get rid of the useless u8 cast.
Fixes: 6c009ab89a21 ("mtd: generic FSMC NAND MTD driver") Cc: stable@vger.kernel.org Signed-off-by: Boris Brezillon boris.brezillon@bootlin.com
drivers/mtd/nand/raw/fsmc_nand.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Acked-by: Miquel Raynal miquel.raynal@bootlin.com
Thanks, Miquèl