diff options
author | Stefan Agner <stefan@agner.ch> | 2015-04-07 17:07:07 +0200 |
---|---|---|
committer | Stefan Agner <stefan@agner.ch> | 2015-04-14 09:08:07 +0200 |
commit | d301314a5eb5da3d3c6c8d2ce56aa31026ede84c (patch) | |
tree | 0fdeb70437137c34e0616c06c4a57533cab93216 /drivers | |
parent | 5dc36fa697d2351bc8b68982b3e62cdafc47ed9c (diff) |
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).
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/nand/vf610_nfc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/vf610_nfc.c b/drivers/mtd/nand/vf610_nfc.c index 66b335d0082..16485f5713e 100644 --- a/drivers/mtd/nand/vf610_nfc.c +++ b/drivers/mtd/nand/vf610_nfc.c @@ -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. */ |