]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mtd: rawnand: meson: fix OOB available bytes for ECC
authorArseniy Krasnov <AVKrasnov@sberdevices.ru>
Wed, 5 Jul 2023 06:52:10 +0000 (09:52 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Aug 2023 13:13:56 +0000 (15:13 +0200)
commitb92c88009da12efaca21ac3af74497d42e79d864
tree44f18ec1d2e5c03711d9fa80c556ac43ae6419b5
parentb0875c583e41a7a245dde87463d81324988b22e1
mtd: rawnand: meson: fix OOB available bytes for ECC

commit 7e6b04f9238eab0f684fafd158c1f32ea65b9eaa upstream.

It is incorrect to calculate number of OOB bytes for ECC engine using
some "already known" ECC step size (1024 bytes here). Number of such
bytes for ECC engine must be whole OOB except 2 bytes for bad block
marker, while proper ECC step size and strength will be selected by
ECC logic.

Fixes: 8fae856c5350 ("mtd: rawnand: meson: add support for Amlogic NAND flash controller")
Cc: <Stable@vger.kernel.org>
Signed-off-by: Arseniy Krasnov <AVKrasnov@sberdevices.ru>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20230705065211.293500-1-AVKrasnov@sberdevices.ru
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/nand/raw/meson_nand.c