[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNARd0sKyqvZO_Tp6LV6V7p1pcWWdjfU2QJCmnT0hdeBTXg@mail.gmail.com>
Date: Thu, 23 Mar 2017 16:05:02 +0900
From: Masahiro Yamada <yamada.masahiro@...ionext.com>
To: Boris Brezillon <boris.brezillon@...e-electrons.com>
Cc: linux-mtd@...ts.infradead.org,
Laurent Monat <laurent.monat@...uantique.com>,
thorsten.christiansson@...uantique.com,
Enrico Jorns <ejo@...gutronix.de>,
Jason Roberts <jason.e.roberts@...el.com>,
Artem Bityutskiy <artem.bityutskiy@...ux.intel.com>,
Dinh Nguyen <dinguyen@...nel.org>,
Marek Vasut <marek.vasut@...il.com>,
Brian Norris <computersforpeace@...il.com>,
Graham Moore <grmoore@...nsource.altera.com>,
David Woodhouse <dwmw2@...radead.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
Chuanxiao Dong <chuanxiao.dong@...el.com>,
Jassi Brar <jaswinder.singh@...aro.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Richard Weinberger <richard@....at>,
Cyrille Pitchen <cyrille.pitchen@...el.com>
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@...e-electrons.com>:
> On Wed, 22 Mar 2017 23:07:19 +0900
> Masahiro Yamada <yamada.masahiro@...ionext.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
Powered by blists - more mailing lists