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)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 12 Jul 2023 11:45:08 +0000 (13:45 +0200)
commit9cc0a598b944816f2968baf2631757f22721b996
treeb97a1bba00c9d0d4680bf7fd674495f50a6ecbc4
parent2ec2839a9062db8a592525a3fdabd42dcd9a3a9b
mtd: rawnand: brcmnand: Fix potential false time out warning

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
drivers/mtd/nand/raw/brcmnand/brcmnand.c