Re: [PATCH 4.4 03/34] mtd: nand: gpmi: Fix failure when a erased page has a bitflip at BBM
From: Ben Hutchings
Date: Tue Mar 06 2018 - 16:22:40 EST
On Fri, 2018-03-02 at 09:50 +0100, Greg Kroah-Hartman wrote:
> 4.4-stable review patch.ÂÂIf anyone has any objections, please let me know.
>
> ------------------
>
> From: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
>
>
> [ Upstream commit fdf2e821052958a114618a95ab18a300d0b080cb ]
>
> When erased subpages are read then the BCH decoder returns STATUS_ERASED
> if they are all empty, or STATUS_UNCORRECTABLE if there are bitflips.
> When there are bitflips, we have to set these bits again to show the
> upper layers a completely erased page. When a bitflip happens in the
> exact byte where the bad block marker is, then this byte is swapped
> with another byte in block_mark_swapping(). The correction code then
> detects a bitflip in another subpage and no longer corrects the bitflip
> where it really happens.
[...]
This seesm to be a bug fix for commit bd2e778c9ee3 "gpmi-nand: Handle
ECC Errors in erased pages". That's not in 4.4 so the bug fix is not
needed, though it doesn't appear to do any harm.
Ben.
--
Ben Hutchings
Software Developer, Codethink Ltd.