Messages in this thread | | | From | Masahiro Yamada <> | Date | Thu, 23 Mar 2017 16:05:02 +0900 | Subject | Re: [PATCH v2 12/53] mtd: nand: denali: support HW_ECC_FIXUP capability |
| |
Hi Boris,
2017-03-23 6:12 GMT+09:00 Boris Brezillon <boris.brezillon@free-electrons.com>: > On Wed, 22 Mar 2017 23:07:19 +0900 > Masahiro Yamada <yamada.masahiro@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
| |