]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mtd: rawnand: brcmnand: Fix potential false time out warning
authorWilliam Zhang <william.zhang@broadcom.com>
Thu, 6 Jul 2023 18:29:06 +0000 (11:29 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Sep 2023 08:47:06 +0000 (10:47 +0200)
commit58c6c901705fce84ac7a8ec90291d23525782124
tree7f6d04f5c247bbcf1a4891ff5328737e72f56e54
parent0f60ac8681e999ba59e5aa14af3742648e3bf8b0
mtd: rawnand: brcmnand: Fix potential false time out warning

commit 9cc0a598b944816f2968baf2631757f22721b996 upstream.

If system is busy during the command status polling function, the driver
may not get the chance to poll the status register till the end of time
out and return the premature status.  Do a final check after time out
happens to ensure reading the correct status.

Fixes: 9d2ee0a60b8b ("mtd: nand: brcmnand: Check flash #WP pin status before nand erase/program")
Signed-off-by: William Zhang <william.zhang@broadcom.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Cc: stable@vger.kernel.org
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20230706182909.79151-3-william.zhang@broadcom.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/nand/brcmnand/brcmnand.c