On 08/02/2018 01:03 AM, Kurt Kanzenbach wrote:
> From: Darwin Dingel <darwin.din...@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&amp;data=02%7C01%7Cyork.sun%40nxp.com%7C79aca70c61e943b59b1d08d5f84e77eb%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636687938268644852&amp;sdata=PjrH%2FF6LyGA%2BpVjHfqQpn4qhvJKeRHG%2Fb3434wuQy3o%3D&amp;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.din...@alliedtelesis.co.nz>
> Cc: Pavel Machek <pa...@denx.de>
> Cc: Scott Wood <o...@buserror.net>
> Acked-by: Pavel Machek <pa...@denx.de>
> [Kurt: Replaced dev_err by printf due to compiler warnings]
> Tested-by: Kurt Kanzenbach <k...@linutronix.de>
> Signed-off-by: Kurt Kanzenbach <k...@linutronix.de>
> ---
>  drivers/mtd/nand/fsl_ifc_nand.c | 69 
> +++++++++++++++++++++++------------------
>  1 file changed, 39 insertions(+), 30 deletions(-)


Applied to fsl-qoriq master, awaiting upstream.
Thanks.

York

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to