lkml.org 
[lkml]   [2017]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [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

    \
     
     \ /
      Last update: 2017-03-23 08:36    [W:3.707 / U:0.072 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site