]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: atmel_nand: return max bitflips in all sectors in pmecc_correction()
authorWu, Josh <Josh.wu@atmel.com>
Wed, 14 Jan 2015 03:50:46 +0000 (11:50 +0800)
committerBrian Norris <computersforpeace@gmail.com>
Tue, 20 Jan 2015 20:42:33 +0000 (12:42 -0800)
commit474282022e7b64e8406294af6af2d06ab0e2b61f
tree7acf1da8a55f2285f5bd85d785fbfb6cccd55306
parentbd7a1f6bda27fd840740674c58382f5b7b77b8d0
mtd: atmel_nand: return max bitflips in all sectors in pmecc_correction()

atmel_nand_pmecc_read_page() will return the total bitflips in this
page. This is incorrect.

As one nand page includes multiple ecc sectors, that will cause the
returned total bitflips exceed ecc capablity.

So this patch will make pmecc_correct() return the max bitflips of all
sectors in the page. That also makes atmel_nand_pmecc_read_page() return
the max bitflips.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/atmel_nand.c