diff options
author | Sascha Hauer <[email protected]> | 2017-12-05 11:51:40 +0100 |
---|---|---|
committer | Richard Weinberger <[email protected]> | 2017-12-15 22:26:15 +0100 |
commit | fdf2e821052958a114618a95ab18a300d0b080cb (patch) | |
tree | 9808efa784e15cbafe51876070f8f458bb8f2787 /include/linux/fpga/fpga-bridge.h | |
parent | 50c4c4e268a2d7a3e58ebb698ac74da0de40ae36 (diff) |
mtd: nand: gpmi: Fix failure when a erased page has a bitflip at BBM
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.
Correct this behaviour by calling block_mark_swapping() after the
bitflips have been corrected.
In our case UBIFS failed with this bug because it expects erased
pages to be really empty:
UBIFS error (pid 187): ubifs_scan: corrupt empty space at LEB 36:118735
UBIFS error (pid 187): ubifs_scanned_corruption: corruption at LEB 36:118735
UBIFS error (pid 187): ubifs_scanned_corruption: first 8192 bytes from LEB 36:118735
UBIFS error (pid 187): ubifs_scan: LEB 36 scanning failed
UBIFS error (pid 187): do_commit: commit failed, error -117
Signed-off-by: Sascha Hauer <[email protected]>
Reviewed-by: Richard Weinberger <[email protected]>
Acked-by: Boris Brezillon <[email protected]>
Signed-off-by: Richard Weinberger <[email protected]>
Diffstat (limited to 'include/linux/fpga/fpga-bridge.h')
0 files changed, 0 insertions, 0 deletions