[U-Boot] [PATCH 1/1] mtd: nand: fsl_ifc: Fix handling of bitflips in erased pages
York Sun
york.sun at nxp.com
Tue Aug 7 21:52:46 UTC 2018
On 08/02/2018 01:03 AM, Kurt Kanzenbach wrote:
> From: Darwin Dingel <darwin.dingel at 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.kernel.org%2Fpatch%2F9758117%2F&data=02%7C01%7Cyork.sun%40nxp.com%7C79aca70c61e943b59b1d08d5f84e77eb%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636687938268644852&sdata=PjrH%2FF6LyGA%2BpVjHfqQpn4qhvJKeRHG%2Fb3434wuQy3o%3D&reserved=0
>
> 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 at alliedtelesis.co.nz>
> Cc: Pavel Machek <pavel at denx.de>
> Cc: Scott Wood <oss at buserror.net>
> Acked-by: Pavel Machek <pavel at denx.de>
> [Kurt: Replaced dev_err by printf due to compiler warnings]
> Tested-by: Kurt Kanzenbach <kurt at linutronix.de>
> Signed-off-by: Kurt Kanzenbach <kurt at 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.
York
More information about the U-Boot
mailing list