Hi Boris,
2017-03-23 6:12 GMT+09:00 Boris Brezillon <boris.brezil...@free-electrons.com>: > On Wed, 22 Mar 2017 23:07:19 +0900 > Masahiro Yamada <yamada.masah...@socionext.com> wrote: > >> +static int denali_hw_ecc_fixup(struct mtd_info *mtd, >> + struct denali_nand_info *denali) >> +{ >> + int bank = denali->flash_bank; >> + uint32_t ecc_cor; >> + unsigned int max_bitflips; >> + >> + ecc_cor = ioread32(denali->flash_reg + ECC_COR_INFO(bank)); >> + ecc_cor >>= ECC_COR_INFO__SHIFT(bank); >> + >> + if (ecc_cor & ECC_COR_INFO__UNCOR_ERR) >> + return -EBADMSG; > > As previously mentioned, just increment ecc_stats.failed. > I explained the intention of -EBADMSG in 11/53. ecc_stats.failed is incremented in denali_read_page(). -- Best Regards Masahiro Yamada