
Hi York,
On Tue, Aug 07, 2018 at 09:52:46PM +0000, York Sun wrote:
On 08/02/2018 01:03 AM, Kurt Kanzenbach wrote:
From: Darwin Dingel darwin.dingel@alliedtelesis.co.nz
This is a fix made for the fsl_ifc_nand driver on linux kernel by Pavel Machek and is applied to uboot. It is currently on applied on linux-mtd.
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwork...
IFC always raises ECC errors on erased pages. It is only ignored when the buffer is checked for all 0xFF by is_blank(). The problem is a single bitflip will cause is_blank() and then mtd_read to fail. The fix makes use of nand_check_erased_ecc_chunk() to check for empty pages instead of is_blank(). This also makes sure that reads are made at ECC page size granularity to get a proper bitflip count. If the number of bitflips does not exceed the ECC strength, the page is considered empty and the bitflips will be corrected when data is sent to the higher layers (e.g. ubi).
Signed-off-by: Darwin Dingel darwin.dingel@alliedtelesis.co.nz Cc: Pavel Machek pavel@denx.de Cc: Scott Wood oss@buserror.net Acked-by: Pavel Machek pavel@denx.de [Kurt: Replaced dev_err by printf due to compiler warnings] Tested-by: Kurt Kanzenbach kurt@linutronix.de Signed-off-by: Kurt Kanzenbach kurt@linutronix.de
drivers/mtd/nand/fsl_ifc_nand.c | 69 +++++++++++++++++++++++------------------ 1 file changed, 39 insertions(+), 30 deletions(-)
Scott,
Please comment. I can bring it in with your ack.
I guess Scott stepped down as NAND maintainer (see MAINTAINERS file). That's why I sent the patch directly to you.
Thanks, Kurt
York