]> Gentwo Git Trees - linux/.git/commit
mtd: rawnand: stm32_fmc2: fix ECC overwrite
authorChristophe Kerello <christophe.kerello@foss.st.com>
Tue, 12 Aug 2025 07:30:08 +0000 (09:30 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 28 Aug 2025 12:26:51 +0000 (14:26 +0200)
commit811c0da4542df3c065f6cb843ced68780e27bb44
tree7be82977ca8a6c2f67d85e9edcc19db13a742f4a
parent513c40e59d5a414ab763a9c84797534b5e8c208d
mtd: rawnand: stm32_fmc2: fix ECC overwrite

In case OOB write is requested during a data write, ECC is currently
lost. Avoid this issue by only writing in the free spare area.
This issue has been seen with a YAFFS2 file system.

Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com>
Cc: stable@vger.kernel.org
Fixes: 2cd457f328c1 ("mtd: rawnand: stm32_fmc2: add STM32 FMC2 NAND flash controller driver")
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/raw/stm32_fmc2_nand.c