Re: [PATCH v1] mtd: spinand: micron: correct parameters

Martin Kurbanov
2023-08-16T15:29:11Z

Hi Frieder.

On 16.08.2023 10:21, Frieder Schrempf wrote:
> I'm okay with 1. and with adjusting region->offset to 4. But I don't
> really get why we want to restrict the free oob data to the
> non-ECC-protected area only. Is this specific to Micron? Other SPI NAND
> drivers also spread the free area over both, the ECC-protected and the
> non-protected bytes. Why do it differently here?

We encountered a problem with the JFFS2 file system: JFFS2 marks erased
blocks with a marker to avoid re-erasing them. To do this, it writes
a special marker (cleanmarker) in the free OOB area. And if this OOB
area is protected by ECC, the ECC will be written. However, during
the next write to the main area of the same block, the ECC will be
incorrect because it's necessary to program both the main area and
the OOB area at one programming time, so that the ECC parity code can
be calculated properly. Other SPI NAND flash also susceptible to
this problem.

--
Best Regards,
Martin Kurbanov