Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mtd: nand: brcmnand: Change BUG_ON in brcmnand_send_cmd

Change the BUG_ON() condition in brcmnand_send_cmd() which checks for
the interrupt status "controller ready" bit to a WARN_ON.

There is no good reason to kill the system when this condition occur
because we could have systems which listed the NAND controller as
available (e.g: from Device Tree), but the NAND chip could be
malfunctioning and not responding.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Kamal Dasu <kdasu.kdev@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>

authored by

Florian Fainelli and committed by
Brian Norris
422485da 79ad07d4

+1 -1
+1 -1
drivers/mtd/nand/brcmnand/brcmnand.c
··· 1165 1165 ctrl->cmd_pending = cmd; 1166 1166 1167 1167 intfc = brcmnand_read_reg(ctrl, BRCMNAND_INTFC_STATUS); 1168 - BUG_ON(!(intfc & INTFC_CTLR_READY)); 1168 + WARN_ON(!(intfc & INTFC_CTLR_READY)); 1169 1169 1170 1170 mb(); /* flush previous writes */ 1171 1171 brcmnand_write_reg(ctrl, BRCMNAND_CMD_START,