]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: spinand: Fix MTD_OPS_AUTO_OOB requests
authorMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 7 Jan 2021 08:38:13 +0000 (09:38 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 14 Jan 2021 15:44:41 +0000 (16:44 +0100)
commitd65e144370f5d09f5df6856af1fe76351a0c18b5
tree07236c202acde57337e37acb56c32fec6afaca87
parentebff9405e565623a2c20c5b11678dfdfb94d7fd9
mtd: spinand: Fix MTD_OPS_AUTO_OOB requests

The initial change breaking the logic is
commit 40f7f1d2c765 ("mtd: spinand: Use the external ECC engine logic")
It inadvertently dropped proper OOB support while doing something
else.

Shortly later, half of it got re-integrated by
commit 2d27939cd7fd ("mtd: spinand: Fix OOB read")
(pointing by the way to a  more early change which had nothing to do
with the issue). Problem is, this commit failed to revert the faulty
change entirely and missed the logic handling MTD_OPS_AUTO_OOB
requests.

Let's fix this mess by re-inserting the missing part now.

Fixes: 2d27939cd7fd ("mtd: spinand: Fix OOB read")
Reported-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20210107083813.24283-1-miquel.raynal@bootlin.com
drivers/mtd/nand/spi/core.c