OSDN Git Service

mtd: nand: mxc: Fix failed/corrected values for v1 controllers
authorSascha Hauer <s.hauer@pengutronix.de>
Wed, 17 Jan 2018 11:32:10 +0000 (12:32 +0100)
committerBoris Brezillon <boris.brezillon@bootlin.com>
Mon, 12 Feb 2018 22:35:38 +0000 (23:35 +0100)
commit5039fc9f2d6db603cba48c770e29251d661ce4e2
tree63f79c3f77896aeedaff0b9c600ed0524d7212da
parent67b87f66cae0bca0dd6602739383381c10b0c9c4
mtd: nand: mxc: Fix failed/corrected values for v1 controllers

The v1 controller code has several flaws:
- We do not forward the number of corrected bitflips to the upper layers
- For 2k page NAND chips only the status results from the fourth subpage
  read are evaluated, so ECC failures in the other subpages remain
  uncovered
- When there are uncorrectable errors we have to increase the statistics
  counter, but still have to return successfully. Currently we return
  an error

This patch fixes this by introducing a v1 specific read_page function.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
drivers/mtd/nand/mxc_nand.c