All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: <markus.stockhausen@gmx.de>
Cc: <richard@nod.at>,  <vigneshr@ti.com>,  <linux-mtd@lists.infradead.org>
Subject: Re: AW: [PATCH v2 2/2] mtd: nand: realtek-ecc: Add Realtek external ECC engine support
Date: Wed, 10 Sep 2025 18:00:40 +0200	[thread overview]
Message-ID: <87segub8lz.fsf@bootlin.com> (raw)
In-Reply-To: <017601dc226a$55da4d40$018ee7c0$@gmx.de> (markus stockhausen's message of "Wed, 10 Sep 2025 17:48:20 +0200")

On 10/09/2025 at 17:48:20 +02, <markus.stockhausen@gmx.de> wrote:

>> Von: Miquel Raynal <miquel.raynal@bootlin.com> 
>> Gesendet: Mittwoch, 10. September 2025 10:43
>>
>> > +	ret = FIELD_GET(RTL_ECC_RESULT, status);
>> > +	all_one = FIELD_GET(RTL_ECC_ALL_ONE, status);
>>
>> Maybe you should check whether all_one remains true if there are
>> correctable bitflips in your buffer (you may use nandflipbits for that
>> purpose). If not, you shall probably spend extra time when checking for
>> ret checking if there are less bitflips than the ECC controller can
>> correct compared to ones in the *entire* buffer, which would indicate
>> that you are really in the presence of an erased page, see:
>> https://elixir.bootlin.com/linux/v6.16.5/source/drivers/mtd/nand/raw/nand_base.c#L2841
>>
>> This helper may be moved if you need it.
>
> ECC engine cannot handle bitflips in erased blocks.
> Seems as this helper really can increase robustness
> in this case. I will make use of it in the next version.
>
> What do you mean by "can be moved"?

It is part of the raw NAND subsystem and is not a NAND wide helper,
ie. it is not available for SPI NANDs nor NAND ECC engines. The herlper
is already device agnostic, so you might just need to moeve it out of
mtd/nand/raw/nand_base.c. Perhaps you can put it into mtd/nand/core.c or
whatever other place you see fit.

Cheers,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

      reply	other threads:[~2025-09-10 16:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-28 14:34 [PATCH v2 0/2] Realtek ECC engine Markus Stockhausen
2025-08-28 14:34 ` Markus Stockhausen
2025-08-28 14:34 ` [PATCH v2 1/2] dt-bindings: mtd: Add realtek,rtl9301-ecc Markus Stockhausen
2025-08-28 14:34   ` Markus Stockhausen
2025-09-01  5:14   ` Krzysztof Kozlowski
2025-09-01  5:14     ` Krzysztof Kozlowski
2025-09-10  8:45   ` Miquel Raynal
2025-09-10  8:45     ` Miquel Raynal
2025-08-28 14:34 ` [PATCH v2 2/2] mtd: nand: realtek-ecc: Add Realtek external ECC engine support Markus Stockhausen
2025-08-28 14:34   ` Markus Stockhausen
2025-09-10  8:43   ` Miquel Raynal
2025-09-10  8:43     ` Miquel Raynal
2025-09-10 15:48     ` AW: " markus.stockhausen
2025-09-10 16:00       ` Miquel Raynal [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87segub8lz.fsf@bootlin.com \
    --to=miquel.raynal@bootlin.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=markus.stockhausen@gmx.de \
    --cc=richard@nod.at \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.