diff options
| -rw-r--r-- | drivers/mtd/nand/pxa3xx_nand.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index c10cb06884f9..f25d71b20931 100644 --- a/drivers/mtd/nand/pxa3xx_nand.c +++ b/drivers/mtd/nand/pxa3xx_nand.c | |||
| @@ -751,6 +751,7 @@ static int pxa3xx_nand_read_page_hwecc(struct mtd_info *mtd, | |||
| 751 | { | 751 | { |
| 752 | struct pxa3xx_nand_host *host = mtd->priv; | 752 | struct pxa3xx_nand_host *host = mtd->priv; |
| 753 | struct pxa3xx_nand_info *info = host->info_data; | 753 | struct pxa3xx_nand_info *info = host->info_data; |
| 754 | int max_bitflips = 0; | ||
| 754 | 755 | ||
| 755 | chip->read_buf(mtd, buf, mtd->writesize); | 756 | chip->read_buf(mtd, buf, mtd->writesize); |
| 756 | chip->read_buf(mtd, chip->oob_poi, mtd->oobsize); | 757 | chip->read_buf(mtd, chip->oob_poi, mtd->oobsize); |
| @@ -758,6 +759,7 @@ static int pxa3xx_nand_read_page_hwecc(struct mtd_info *mtd, | |||
| 758 | if (info->retcode == ERR_SBERR) { | 759 | if (info->retcode == ERR_SBERR) { |
| 759 | switch (info->use_ecc) { | 760 | switch (info->use_ecc) { |
| 760 | case 1: | 761 | case 1: |
| 762 | max_bitflips = 1; | ||
| 761 | mtd->ecc_stats.corrected++; | 763 | mtd->ecc_stats.corrected++; |
| 762 | break; | 764 | break; |
| 763 | case 0: | 765 | case 0: |
| @@ -776,7 +778,7 @@ static int pxa3xx_nand_read_page_hwecc(struct mtd_info *mtd, | |||
| 776 | mtd->ecc_stats.failed++; | 778 | mtd->ecc_stats.failed++; |
| 777 | } | 779 | } |
| 778 | 780 | ||
| 779 | return 0; | 781 | return max_bitflips; |
| 780 | } | 782 | } |
| 781 | 783 | ||
| 782 | static uint8_t pxa3xx_nand_read_byte(struct mtd_info *mtd) | 784 | static uint8_t pxa3xx_nand_read_byte(struct mtd_info *mtd) |
