Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1282362

Re: [PATCH] mtd: brcmnand: Workaround false ECC uncorrectable errors

From Jonas Gorski <jogo@openwrt.org>
Newsgroups linux.kernel
Subject Re: [PATCH] mtd: brcmnand: Workaround false ECC uncorrectable errors
Date 2015-12-02 21:50 +0100
Message-ID <qBmvD-3Jz-13@gated-at.bofh.it> (permalink)
References <qzTm1-4xc-9@gated-at.bofh.it> <qAQFs-8sH-33@gated-at.bofh.it> <qBm2C-3zv-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Dec 2, 2015 at 9:17 PM, Simon Arlott <simon@fire.lp0.eu> wrote:
> On 01/12/15 10:41, Jonas Gorski wrote:
>> On Sat, Nov 28, 2015 at 8:23 PM, Simon Arlott <simon@fire.lp0.eu> wrote:
>>> +
>>> +       /* Go to start of buffer */
>>> +       buf -= FC_WORDS;
>>> +
>>> +       /* Erased if all data bytes are 0xFF */
>>> +       buf_erased = memchr_inv(buf, 0xFF, FC_WORDS) == NULL;
>>> +
>>> +       if (!buf_erased)
>>> +               goto out_free;
>>
>> We now have a function exactly for that use case in 4.4,
>> nand_check_erased_buf [1], consider using that. This also has the
>> benefit of treating bit flips as correctable as long as the ECC scheme
>> is strong enough.
>
> I have no idea whether or not it's appropriate to specify
> bitflips_threshold > 0 so it'd just be a more complex way to do
> a memchr_inv() search for 0xFF.

The threshold would be the amount of bitflips the code can correct, so
basically ecc.strength (at least that is my understanding).

> The code also has to check for the hamming code bytes being all 0x00,
> because according to the comments [2], the controller also has
> difficulty with the non-erased all-0xFFs scenario too.

According to brcmnand.c hamming can fix up to fifteen bitflips, but in
the current code you would fail a hamming protected all-0xff-page for
even a single bitflip in the data or in the ecc bytes, which means
that all-0xff-pages wouldn't be protected at all.


Jonas
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH] mtd: brcmnand: Workaround false ECC uncorrectable errors Jonas Gorski <jogo@openwrt.org> - 2015-12-01 11:50 +0100
  Re: [PATCH] mtd: brcmnand: Workaround false ECC uncorrectable errors Simon Arlott <simon@fire.lp0.eu> - 2015-12-02 21:20 +0100
    Re: [PATCH] mtd: brcmnand: Workaround false ECC uncorrectable errors Jonas Gorski <jogo@openwrt.org> - 2015-12-02 21:50 +0100
      Re: [PATCH] mtd: brcmnand: Workaround false ECC uncorrectable errors Brian Norris <computersforpeace@gmail.com> - 2015-12-02 22:00 +0100
        Re: [PATCH] mtd: brcmnand: Workaround false ECC uncorrectable errors Brian Norris <computersforpeace@gmail.com> - 2015-12-02 22:10 +0100
        Re: [PATCH] mtd: brcmnand: Workaround false ECC uncorrectable errors Jonas Gorski <jogo@openwrt.org> - 2015-12-02 22:10 +0100
          Re: [PATCH] mtd: brcmnand: Workaround false ECC uncorrectable errors Simon Arlott <simon@fire.lp0.eu> - 2015-12-02 22:40 +0100
          Re: [PATCH] mtd: brcmnand: Workaround false ECC uncorrectable errors Brian Norris <computersforpeace@gmail.com> - 2015-12-02 23:30 +0100

csiph-web