]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mtd: nand: mtk-ecc: stop on ECC idle timeouts
authorPengpeng Hou <pengpeng@iscas.ac.cn>
Tue, 23 Jun 2026 13:57:29 +0000 (21:57 +0800)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 29 Jun 2026 14:58:00 +0000 (16:58 +0200)
commit16f7ec8d5dc100eafd2c8e06cd30340a30b104a1
tree4efa54c1900f0efd335459baa9fc96c111ebaf5d
parent66fb31358108d10245b9e4ef0eef3e7d9747055e
mtd: nand: mtk-ecc: stop on ECC idle timeouts

mtk_ecc_wait_idle() logs when the encoder or decoder does not become
idle, but returns void. Callers can therefore configure a non-idle ECC
engine or read parity bytes after an unconfirmed encoder idle state.

Return the idle poll result and propagate it from the enable and encode
paths that require the engine to be idle before continuing.

Fixes: 1d6b1e464950 ("mtd: mediatek: driver for MTK Smart Device")
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/ecc-mtk.c