]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
mtd: rawnand: meson: fix bitmask for length in command word
authorArseniy Krasnov <avkrasnov@sberdevices.ru>
Wed, 29 Mar 2023 07:47:26 +0000 (10:47 +0300)
committerRoxana Nicolescu <roxana.nicolescu@canonical.com>
Wed, 17 May 2023 11:34:08 +0000 (13:34 +0200)
commit7bec35460952a00f6779a06d2234c36a14587d79
tree88d2120ba603368996bbf64368ed93072f96bdae
parent1da11a2db8986a21b6c91bc1ba8d5487daddb7c9
mtd: rawnand: meson: fix bitmask for length in command word

BugLink: https://bugs.launchpad.net/bugs/2017219
commit 93942b70461574ca7fc3d91494ca89b16a4c64c7 upstream.

Valid mask is 0x3FFF, without this patch the following problems were
found:

1) [    0.938914] Could not find a valid ONFI parameter page, trying
                  bit-wise majority to recover it
   [    0.947384] ONFI parameter recovery failed, aborting

2) Read with disabled ECC mode was broken.

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/3794ffbf-dfea-e96f-1f97-fe235b005e19@sberdevices.ru
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/mtd/nand/raw/meson_nand.c