From: Gabor Juhos <j4g8y7@gmail.com>
To: Johan Alvarado <contact@c127.dev>,
broonie@kernel.org, md.alam@oss.qualcomm.com
Cc: konradybcio@kernel.org, pengpeng@iscas.ac.cn,
miquel.raynal@bootlin.com, quic_varada@quicinc.com,
quic_srichara@quicinc.com, linux-spi@vger.kernel.org,
linux-mtd@lists.infradead.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] spi: spi-qpic-snand: drop the redundant ECC context handling
Date: Thu, 17 Sep 2026 09:17:07 +0200 [thread overview]
Message-ID: <70d620e5-b03a-48ff-9b56-e787d03b4aed@gmail.com> (raw)
In-Reply-To: <20260911184416.109790-3-contact@c127.dev>
2026. 09. 11. 20:44 keltezéssel, Johan Alvarado írta:
> qcom_spi_ecc_init_ctx_pipelined() now publishes the ECC context to
> snandc->qspi->ecc, so the assignment in
> qcom_spi_ecc_prepare_io_req_pipelined() repeats what the pointer already
> holds, and the zeroed struct qpic_ecc that qcom_spi_probe() allocates is
> never read.
>
> The pointer is non-NULL only between context creation and destruction,
> and every reader runs inside that window. The ooblayout callbacks are
> installed by init_ctx. The page read, write and program helpers run only
> when prepare_io_req has set page_rw or oob_rw. qcom_spi_block_erase()
> runs only while the mtd is registered, which happens after init_ctx and
> ends before cleanup_ctx. The controller drives a single chip select, so
> the per-controller pointer and the per-chip context cannot disagree.
>
> Remove both. No functional change.
>
> Suggested-by: Gabor Juhos <j4g8y7@gmail.com>
> Signed-off-by: Johan Alvarado <contact@c127.dev>
> ---
> Tested on a Mercusys MR80X (IPQ5018, ESMT F50D1G41LB) with both patches
> backported to 6.18.44. Five boots, rootfs mounted every time, mtd
> reported 0 ECC failures and 0 corrected bits, and a 4 MiB file on the
> UBIFS overlay kept its sha256 across the reboots. Overlay churn raised
> the UBI maximum erase counter from 13 to 15, so qcom_spi_block_erase()
> ran repeatedly. Build-tested on this base with W=1 and sparse, no
> warnings, patch 1 alone and both patches applied.
Tested on Tp-Link Archer AX55 v1 built on top of 98100d83adc8 ("Merge
remote-tracking branch 'spi/for-7.4' into spi-next"). No regressions observed.
Tested-by: Gabor Juhos <j4g8y7@gmail.com>
next prev parent reply other threads:[~2026-09-17 7:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-11 18:44 [PATCH v2 0/2] spi: spi-qpic-snand: fix the stale ECC context pointer Johan Alvarado
2026-09-11 18:44 ` [PATCH v2 1/2] spi: spi-qpic-snand: publish the ECC context to snandc->qspi Johan Alvarado
2026-09-11 18:44 ` [PATCH v2 2/2] spi: spi-qpic-snand: drop the redundant ECC context handling Johan Alvarado
2026-09-11 19:10 ` sashiko-bot
2026-09-12 0:05 ` Johan Alvarado
2026-09-17 7:17 ` Gabor Juhos [this message]
2026-09-17 15:25 ` [PATCH v2 0/2] spi: spi-qpic-snand: fix the stale ECC context pointer Mark Brown
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=70d620e5-b03a-48ff-9b56-e787d03b4aed@gmail.com \
--to=j4g8y7@gmail.com \
--cc=broonie@kernel.org \
--cc=contact@c127.dev \
--cc=konradybcio@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=md.alam@oss.qualcomm.com \
--cc=miquel.raynal@bootlin.com \
--cc=pengpeng@iscas.ac.cn \
--cc=quic_srichara@quicinc.com \
--cc=quic_varada@quicinc.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®