aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2021-04-13 14:01:34 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2021-04-13 14:01:34 -0700
commiteebe426d32e1a10ac7c35f8ffab5f818c32a2454 (patch)
treedc3b49f2f42a8e41b4618b15aeb3919d2bc34e1d
parentMerge tag 'm68knommu-for-v5.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu (diff)
parentmtd: rawnand: mtk: Fix WAITRDY break condition and timeout (diff)
downloadwireguard-linux-eebe426d32e1a10ac7c35f8ffab5f818c32a2454.tar.xz
wireguard-linux-eebe426d32e1a10ac7c35f8ffab5f818c32a2454.zip
Merge tag 'fixes-for-5.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux
Pull MTD fix from Richard Weinberger: "Fix WAITRDY break condition and timeout in mtk nand driver" * tag 'fixes-for-5.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: mtd: rawnand: mtk: Fix WAITRDY break condition and timeout
-rw-r--r--drivers/mtd/nand/raw/mtk_nand.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/nand/raw/mtk_nand.c b/drivers/mtd/nand/raw/mtk_nand.c
index 57f1f1708994..5c5c92132287 100644
--- a/drivers/mtd/nand/raw/mtk_nand.c
+++ b/drivers/mtd/nand/raw/mtk_nand.c
@@ -488,8 +488,8 @@ static int mtk_nfc_exec_instr(struct nand_chip *chip,
return 0;
case NAND_OP_WAITRDY_INSTR:
return readl_poll_timeout(nfc->regs + NFI_STA, status,
- status & STA_BUSY, 20,
- instr->ctx.waitrdy.timeout_ms);
+ !(status & STA_BUSY), 20,
+ instr->ctx.waitrdy.timeout_ms * 1000);
default:
break;
}