diff options
author | Piotr Sroka <piotrs@cadence.com> | 2020-02-10 10:55:28 +0100 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2020-03-11 16:17:55 +0100 |
commit | 0d7d6c8183aadb1dcc13f415941404a7913b46b3 (patch) | |
tree | 2abcd10bf7abc2489f8e6a66615ab13b05baf182 /drivers/mtd | |
parent | mtd: rawnand: cadence: change bad block marker size (diff) | |
download | linux-0d7d6c8183aadb1dcc13f415941404a7913b46b3.tar.xz linux-0d7d6c8183aadb1dcc13f415941404a7913b46b3.zip |
mtd: rawnand: cadence: reinit completion before executing a new command
Reing the completion object before executing CDMA command to make sure
the 'done' flag is OK.
Fixes: ec4ba01e894d ("mtd: rawnand: Add new Cadence NAND driver to MTD subsystem")
Cc: stable@vger.kernel.org
Signed-off-by: Piotr Sroka <piotrs@cadence.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/1581328530-29966-4-git-send-email-piotrs@cadence.com
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/raw/cadence-nand-controller.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/nand/raw/cadence-nand-controller.c b/drivers/mtd/nand/raw/cadence-nand-controller.c index 5c1bbb05ab51..efddc5c68afb 100644 --- a/drivers/mtd/nand/raw/cadence-nand-controller.c +++ b/drivers/mtd/nand/raw/cadence-nand-controller.c @@ -998,6 +998,7 @@ static int cadence_nand_cdma_send(struct cdns_nand_ctrl *cdns_ctrl, return status; cadence_nand_reset_irq(cdns_ctrl); + reinit_completion(&cdns_ctrl->complete); writel_relaxed((u32)cdns_ctrl->dma_cdma_desc, cdns_ctrl->reg + CMD_REG2); |