]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mtd: rawnand: brcmnand: ECC error handling on EDU transfers
authorKamal Dasu <kdasu.kdev@gmail.com>
Fri, 12 Jun 2020 21:29:02 +0000 (17:29 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Aug 2020 11:07:31 +0000 (13:07 +0200)
commit76629a6d86a7956279d38eb3686027d3a89eaabf
tree56b2ca570bb0aef58306603e443089e38b1a8417
parent0b36d8e1db13f4ac1ef6ea057ae43fa88160c725
mtd: rawnand: brcmnand: ECC error handling on EDU transfers

[ Upstream commit 4551e78ad98add1f16b70cf286d5aad3ce7bcd4c ]

Implement ECC correctable and uncorrectable error handling for EDU
reads. If ECC correctable bitflips are encountered on EDU transfer,
read page again using PIO. This is needed due to a NAND controller
limitation where corrected data is not transferred to the DMA buffer
on ECC error. This applies to ECC correctable errors that are reported
by the controller hardware based on set number of bitflips threshold in
the controller threshold register, bitflips below the threshold are
corrected silently and are not reported by the controller hardware.

Fixes: a5d53ad26a8b ("mtd: rawnand: brcmnand: Add support for flash-edu for dma transfers")
Signed-off-by: Kamal Dasu <kdasu.kdev@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20200612212902.21347-3-kdasu.kdev@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mtd/nand/raw/brcmnand/brcmnand.c