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 2/2] mtd: nand: realtek-ecc: Add Realtek external ECC engine support
Date: Thu, 28 Aug 2025 12:07:02 +0200	[thread overview]
Message-ID: <87iki769q1.fsf@bootlin.com> (raw)
In-Reply-To: <015a01dc152b$9e90a990$dbb1fcb0$@gmx.de> (markus stockhausen's message of "Sun, 24 Aug 2025 21:16:39 +0200")

Hi Markus,

On 24/08/2025 at 21:16:39 +02, <markus.stockhausen@gmx.de> wrote:

>> Von: Miquel Raynal <miquel.raynal@bootlin.com> 
>> Gesendet: Sonntag, 24. August 2025 18:51
>> ...
>> +/*
>> + * The Realtek ECC engine has two operation modes.
>> + *
>> + * - BCH6 : Generate 10 ECC bytes from 512 data bytes plus 6 tag bytes
>> + * - BCH12: Generate 20 ECC bytes from 512 data bytes plus 6 tag bytes
>>
>> What is a tag? I believe it is Realtek wording and we need to find a
>> more generic translation.
>
> I have no real idea. They simply call it "tag". To be more precise
>
> - tag (lowercase): means 6 oob bytes for one 512 byte block
> - syndrome: means 10 ECC bytes for one 512 byte block.
> - TAG (uppercase): means 16 oob bytes (tag+syndrome)

Ok. Based on your feedback, I believe that might be what we more
commonly call "free bytes". "free" as in "available for the user". In the
OOB area you'll mostly find:
- 2 bytes reserved by MTD to store bad block markers
- Bytes available for the user (end user, or more commonly upper layers
  and filesystems. jffs2 does use these free bytes, whereas UBI does not.
    * your "tag" and "TAG", difference is probably that "tag" is not ECC
      protected (subject to bitflip) whereas "TAG" is part of the
      protected area and will be corrected if needed.
- Bytes not available for the user, ie. ECC bytes, which we are being
  read/written at a fixed offset by the ECC engine.

> Do I need to declare the BBM area somehow additionally?

No, they are not user accessible nor ECC bytes. They are not exposed by
the ooblayout callbacks we are discussing.

> Thanks for the other feedback. Will implement that in v2.

Cheers!

Good luck,
Miquèl

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

      reply	other threads:[~2025-08-28 11:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-18  9:27 [PATCH 0/2] Realtek ECC engine Markus Stockhausen
2025-08-18  9:27 ` Markus Stockhausen
2025-08-18  9:27 ` [PATCH 1/2] dt-bindings: mtd: Add realtek,rtl9301-ecc Markus Stockhausen
2025-08-18  9:27   ` Markus Stockhausen
2025-08-18 10:49   ` Rob Herring (Arm)
2025-08-18 10:49     ` Rob Herring (Arm)
2025-08-18  9:27 ` [PATCH 2/2] mtd: nand: realtek-ecc: Add Realtek external ECC engine support Markus Stockhausen
2025-08-18  9:27   ` Markus Stockhausen
2025-08-19  5:11   ` kernel test robot
2025-08-19  5:11     ` kernel test robot
2025-08-24 16:51   ` Miquel Raynal
2025-08-24 16:51     ` Miquel Raynal
2025-08-24 19:16     ` AW: " markus.stockhausen
2025-08-28 10:07       ` 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=87iki769q1.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.