Re: [PATCH] mtd: rawnand: marvell: check for RDY bits after enabling the IRQ
From: Chris Packham <Chris.Packham@alliedtelesis.co.nz>
Date: 2018-09-28 02:56:18
On 27/09/18 19:13, Daniel Mack wrote:
Hi, On 27/9/2018 1:42 AM, Chris Packham wrote:quoted
On 27/09/18 11:33, Chris Packham wrote:quoted
On 27/09/18 09:24, Daniel Mack wrote:quoted
quoted
quoted
diff --git a/drivers/mtd/nand/raw/marvell_nand.c b/drivers/mtd/nand/raw/marvell_nand.c index 666f34b58dec..e96ec7b9a152 100644 --- a/drivers/mtd/nand/raw/marvell_nand.c +++ b/drivers/mtd/nand/raw/marvell_nand.c@@ -613,7 +613,8 @@ static int marvell_nfc_wait_cmdd(struct nand_chip *chip) static int marvell_nfc_wait_op(struct nand_chip *chip, unsigned int timeout_ms) { struct marvell_nfc *nfc = to_marvell_nfc(chip->controller); - int ret; + int ret = -EALREADY;Won't this cause us to hit the if (!ret) below if we don't end up calling wait_for_completion_timeout()?Nope boolean logic fail.Yup :)quoted
quoted
In fact I did just hit something like this on my Armada-385 based board marvell-nfc f10d0000.nand-controller: Timeout waiting for RB signal ubi0 warning: do_sync_erase: error -5 while erasing PEB 755, retryBut this still might be something else, it doesn't happen regularly. For what it's worth Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz>Thanks. Did you see the issue that I described without that patch?
Yes. I've just tried a test without your patch and I see the same thing. I wonder if my R/B configuration is correct.