From: Mehmet Fide <mehmet.fide@gmail.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Stefan Agner <stefan@agner.ch>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Boris Brezillon <bbrezillon@kernel.org>,
Brian Norris <computersforpeace@gmail.com>,
Alexey Klimov <alexey.klimov@linaro.org>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
mehmet.fide@screeningeagle.com
Subject: [PATCH v2 0/3] mtd: rawnand: vf610_nfc: fix the OOB of written pages and command timeouts
Date: Sat, 14 Nov 2026 20:20:28 +0100 [thread overview]
Message-ID: <20261114192031.959376-1-mehmet.fide@gmail.com> (raw)
From: Mehmet Fide <mehmet.fide@screeningeagle.com>
Three fixes for the vf610_nfc driver. All three were pointed out by
Sashiko, on the large-OOB series [1] and on v1 of this one [2].
1/3: the ECC page write transfers the spare area out of the controller
SRAM but nothing ever puts chip->oob_poi there, so every written page
gets whatever the previous transfer left behind as its OOB.
2/3: a command that timed out can still finish later, and then the next
command returns before the controller is done.
3/3: a timeout is only logged, the callers report success.
Tested on a Colibri VF50 (MX30LF1G18AC) with v7.4-rc2, PROVE_LOCKING and
DEBUG_ATOMIC_SLEEP. A debug patch skipped the wait of one command, so
that the command finished after the status flags had been cleared, and
counted the commands that returned while the controller was still busy:
unpatched: 250 after 100 forced timeouts
completion reinitialized (v1): 41 after 100 forced timeouts
this series: 0 after 200 forced timeouts
With the series each forced timeout came back as a read error and the
reads after it returned the right data. An 8 MiB UBIFS write read back
identical after dropping the caches, with no ECC corrections or
failures and no lockdep or atomic sleep report.
Changes in v2:
- rebased on v7.4-rc2. The large-OOB fix that patch 1 builds on
(vf610_nfc_spare_size()) is merged, which was the build failure
Sashiko reported on v1 1/2
- 1/3: comment dropped, commit message shortened, no code change
- 2/3: rewritten. Sashiko was right that reinitializing the completion
is not enough, see the numbers above. The idle interrupt is now
disabled on a timeout and the status flags are cleared before a
command starts
- 3/3: new
[1] https://lore.kernel.org/linux-mtd/20260818114208.2780311-1-mehmet.fide@gmail.com/
[2] https://lore.kernel.org/linux-mtd/20260828085340.3916239-1-mehmet.fide@gmail.com/
Mehmet Fide (3):
mtd: rawnand: vf610_nfc: write the OOB bytes on page writes
mtd: rawnand: vf610_nfc: keep a timed-out command from completing the
next one
mtd: rawnand: vf610_nfc: return an error when a command times out
drivers/mtd/nand/raw/vf610_nfc.c | 41 +++++++++++++++++++++++++++++-----------
1 file changed, 30 insertions(+), 11 deletions(-)
base-commit: 7475ea8b58616b33c04afb976cf0fbaad9dd63fb
--
2.56.0
next reply other threads:[~2026-11-14 19:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-14 19:20 Mehmet Fide [this message]
2026-11-14 19:20 ` [PATCH v2 1/3] mtd: rawnand: vf610_nfc: write the OOB bytes on page writes Mehmet Fide
2026-11-14 19:20 ` [PATCH v2 2/3] mtd: rawnand: vf610_nfc: keep a timed-out command from completing the next one Mehmet Fide
2026-11-14 19:20 ` [PATCH v2 3/3] mtd: rawnand: vf610_nfc: return an error when a command times out Mehmet Fide
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=20261114192031.959376-1-mehmet.fide@gmail.com \
--to=mehmet.fide@gmail.com \
--cc=alexey.klimov@linaro.org \
--cc=bbrezillon@kernel.org \
--cc=computersforpeace@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=mehmet.fide@screeningeagle.com \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=stefan@agner.ch \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®