mtd: vf610_nfc: allow bitflips in an empty page
Allow bit flips in a empty page up to half of the recoverable bits (strength / 2). Signed-off-by: Stefan Agner <stefan@agner.ch>
This commit is contained in:
parent
6fcfd1e890
commit
d111bf99a8
@ -527,7 +527,7 @@ static inline int vf610_nfc_correct_data(struct mtd_info *mtd, u_char *dat)
|
||||
flip = count_written_bits(dat, nfc->chip.ecc.size, ecc_count);
|
||||
|
||||
/* ECC failed. */
|
||||
if (flip > ecc_count)
|
||||
if (flip > ecc_count && flip > (nfc->chip.ecc.strength / 2))
|
||||
return -1;
|
||||
|
||||
/* Erased page. */
|
||||
|
Loading…
Reference in New Issue
Block a user