mtd: rawnand: protect access to rawnand devices while in suspend
authorSean Nyekjaer <sean@geanix.com>
Tue, 8 Feb 2022 08:52:13 +0000 (09:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:22:53 +0000 (14:22 +0200)
commit31d7d7f35045e52c0efe4bbf5beeea02dba6803b
tree34459b613e072974418bf7dff210e44eaafbef96
parent7d94d25c7972195a5cbd89baeb8223dd6845ac8a
mtd: rawnand: protect access to rawnand devices while in suspend

commit 8cba323437a49a45756d661f500b324fc2d486fe upstream.

Prevent rawnand access while in a suspended state.

Commit 013e6292aaf5 ("mtd: rawnand: Simplify the locking") allows the
rawnand layer to return errors rather than waiting in a blocking wait.

Tested on a iMX6ULL.

Fixes: 013e6292aaf5 ("mtd: rawnand: Simplify the locking")
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Cc: stable@vger.kernel.org
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20220208085213.1838273-1-sean@geanix.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/nand/raw/nand_base.c
include/linux/mtd/rawnand.h