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:39:51 +0000 (14:39 +0200)
commit3a21ee89bc22c2768aa6ccbf6fd85ccbab430f04
tree774023a920cf79fc7fc427b635131304c6bd4266
parent145a63201d0000ab6ad951bcbfb8db550e74f4b2
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