summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorNuno Sá <nuno.sa@analog.com>2026-08-31 16:07:18 +0100
committerMiquel Raynal <miquel.raynal@bootlin.com>2026-09-04 20:32:21 +0200
commit636fe10d8f3559210ff63108a208d39ea2e9c3bd (patch)
treec030a2caa4995c1ce2e7429bcf5e3b6aba4a2df2 /tools/perf/scripts/python
parentb890e6163761ddb580cc74f43e15f8bbde15647e (diff)
downloadlinux-636fe10d8f3559210ff63108a208d39ea2e9c3bd.tar.gz
linux-636fe10d8f3559210ff63108a208d39ea2e9c3bd.zip
mtd: spinand: fix zero oobavail when no ECC engine is used
Commit 00c15b78b4b4 ("mtd: spinand: Allow the case where there is no ECC engine") made the OOB free bytes count conditional on having an ECC engine so that probing would not fail when none is requested. However mtd->oobavail is still assigned from ret just after that block, and ret is 0 there, so the device ends up advertising no available OOB bytes at all. mtd_oobavail() returns mtd->oobavail for MTD_OPS_AUTO_OOB, so a zero value makes every automatic OOB access fail with -EINVAL. JFFS2 fares worse: it keeps its cleanmarker in the OOB area on NAND and refuses to mount outright, reporting "inconsistent device description". No ECC engine also means no ooblayout was ever installed, which would make the count return -ENOTSUPP, so install the same fallback layout the on-die path already uses before counting unconditionally. Fixes: 00c15b78b4b4 ("mtd: spinand: Allow the case where there is no ECC engine") Cc: stable@vger.kernel.org Signed-off-by: Nuno Sá <nuno.sa@analog.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions