linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: nand: brcmnand: Change BUG_ON in brcmnand_send_cmd
@ 2016-07-08 17:36 Florian Fainelli
  2016-07-10  1:30 ` Brian Norris
  2016-07-17  3:41 ` Brian Norris
  0 siblings, 2 replies; 4+ messages in thread
From: Florian Fainelli @ 2016-07-08 17:36 UTC (permalink / raw)
  To: linux-mtd
  Cc: Florian Fainelli, Brian Norris, Kamal Dasu, Boris Brezillon,
	Richard Weinberger, David Woodhouse,
	open list:BROADCOM STB NAND FLASH DRIVER, open list

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>
---
Note that I even hesitated to remove that completely, but there is
some value in knowing about this condition since it helps figuring
out what could be wrong.

 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 b6062a2f3dfd..72bdc283778d 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,
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-07-17  3:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-08 17:36 [PATCH] mtd: nand: brcmnand: Change BUG_ON in brcmnand_send_cmd Florian Fainelli
2016-07-10  1:30 ` Brian Norris
2016-07-11 15:32   ` Kamal Dasu
2016-07-17  3:41 ` Brian Norris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).