Skip to content
Commit aad8aa56 authored by Ravi Minnikanti's avatar Ravi Minnikanti Committed by Dario Binacchi
Browse files

mtd: nand: pxa3xx: Incorrect bitflip return on page read

Once a page is read with higher bitflips all subsequent reads
are returning the same bitflip value even though they have none.
max_bitflip variable is not being reset to 0 across page reads.

This is causing problems like incorrectly
marking erase blocks bad by UBI and causing read failures.

Verified the change with both MTD reads and UBI.
This change is inline with other NFC drivers.

Sample error log where a block is marked bad incorrectly:

ubi0: fixable bit-flip detected at PEB 125
ubi0: run torture test for PEB 125
ubi0: fixable bit-flip detected at PEB 125
ubi0 error: torture_peb: read problems on freshly erased PEB 125,
must be bad
ubi0 error: erase_worker: failed to erase PEB 125, error -5
ubi0: mark PEB 125 as bad

Link: https://lore.kernel.org/all/ea0422cd-a8e6-3c36-f551-a0142893301b@marvell.com


Signed-off-by: default avatarrminnikanti <rminnikanti@marvell.com>
Reviewed-by: default avatarChris Packham <judge.packham@gmail.com>
Signed-off-by: default avatarrminnikanti <rminnikanti@marvell.com>
Acked-by: default avatarMichael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: default avatarDario Binacchi <dario.binacchi@amarulasolutions.com>
parent 2978e716
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment