mtd: nand: brcmnand: Change BUG_ON in brcmnand_send_cmd

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Mon Aug 1 18:59:09 PDT 2016


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=422485da15e7e9e6f71a5efd1aa2248595cb486d
Commit:     422485da15e7e9e6f71a5efd1aa2248595cb486d
Parent:     79ad07d45743721010e766e65dc004ad249bd429
Author:     Florian Fainelli <f.fainelli at gmail.com>
AuthorDate: Fri Jul 8 10:36:39 2016 -0700
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Sat Jul 16 20:40:16 2016 -0700

    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 at gmail.com>
    Acked-by: Brian Norris <computersforpeace at gmail.com>
    Reviewed-by: Kamal Dasu <kdasu.kdev at gmail.com>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/nand/brcmnand/brcmnand.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/brcmnand/brcmnand.c b/drivers/mtd/nand/brcmnand/brcmnand.c
index faca01d..8eb2c64 100644
--- a/drivers/mtd/nand/brcmnand/brcmnand.c
+++ b/drivers/mtd/nand/brcmnand/brcmnand.c
@@ -1165,7 +1165,7 @@ static void brcmnand_send_cmd(struct brcmnand_host *host, int cmd)
 	ctrl->cmd_pending = cmd;
 
 	intfc = brcmnand_read_reg(ctrl, BRCMNAND_INTFC_STATUS);
-	BUG_ON(!(intfc & INTFC_CTLR_READY));
+	WARN_ON(!(intfc & INTFC_CTLR_READY));
 
 	mb(); /* flush previous writes */
 	brcmnand_write_reg(ctrl, BRCMNAND_CMD_START,



More information about the linux-mtd-cvs mailing list