On Tue, Sep 4, 2018 at 11:14 AM Boris Brezillon boris.brezillon@bootlin.com wrote:
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
Acked-by: Linus Walleij linus.walleij@linaro.org
Yours, Linus Walleij