From: Frieder Schrempf <frieder.schrempf@kontron.de>
To: Lee Jones <lee@kernel.org>, Han Xu <han.xu@nxp.com>,
Mark Brown <broonie@kernel.org>,
Boris Brezillon <bbrezillon@kernel.org>,
Yogesh Gaur <yogeshnarayan.gaur@nxp.com>,
Suresh Gupta <suresh.gupta@nxp.com>,
linux-spi@vger.kernel.org, imx@lists.linux.dev,
linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org
Subject: Re: [PATCH v2 08/10] spi: fsl-qspi: Propagate clock errors from fsl_qspi_select_mem()
Date: Tue, 1 Dec 2026 10:05:45 +0100 [thread overview]
Message-ID: <a502c118-5ba4-4f27-9c23-c0ffe0cb3f0e@kontron.de> (raw)
In-Reply-To: <20261127153158.2969573-9-lee@kernel.org>
On 27.11.26 16:31, Lee Jones wrote:
> fsl_qspi_select_mem() returns void and silently gives up if either
> clk_set_rate() or fsl_qspi_clk_prep_enable() fails. fsl_qspi_exec_op()
> then carries on with the operation regardless.
>
> When switching between devices, a failed rate change leaves q->selected
> pointing at the previously selected chip, so the operation is issued
> through the previous device's SFAR and AHB window. If the failure
> happens on the first operation, q->selected is still -1 from probe, so
> those offsets are derived from a negative chip select. On controllers
> which need the clocks disabled while the rate is changed, a
> clk_set_rate() failure also leaves the clocks off while registers
> continue to be accessed.
>
> Re-enable the clocks even when setting the rate failed, return any error
> to the caller, and have fsl_qspi_exec_op() abort the operation when
> selecting the device fails.
>
> Fixes: 84d043185dbe ("spi: Add a driver for the Freescale/NXP QuadSPI controller")
> Closes: https://sashiko.dev/#/bug/linux-719261ef-312e-4a94-9a84-fd42a411bee0
> Cc: stable@vger.kernel.org
> Signed-off-by: Lee Jones <lee@kernel.org>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
next prev parent reply other threads:[~2026-12-01 9:05 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 15:31 [PATCH v2 00/10] spi: Fix DMA, bounds, clock, and chip-select bugs Lee Jones
2026-11-27 15:31 ` [PATCH v2 01/10] spi: fsl-cpm: Map the zero page's address, not its struct page Lee Jones
2026-11-27 15:31 ` [PATCH v2 02/10] spi: bcm2835: Store native chip-select GPIO descriptor per device Lee Jones
2026-11-27 15:31 ` [PATCH v2 03/10] spi: ch341: Limit transfers to the hardware packet size Lee Jones
2026-11-27 15:31 ` [PATCH v2 04/10] spi: sprd-adi: Do not copy uninitialised data to rx_buf on read failure Lee Jones
2026-11-27 15:31 ` [PATCH v2 05/10] spi: topcliff-pch: Advance tx_buf between DMA chunks Lee Jones
2026-11-27 15:31 ` [PATCH v2 06/10] spi: cadence-quadspi: Validate num-cs against CQSPI_MAX_CHIPSELECT Lee Jones
2026-11-27 17:22 ` Théo Lebrun
2026-11-27 15:31 ` [PATCH v2 07/10] spi: cadence-xspi: Zero the tail word in m_iowriteq() Lee Jones
2026-11-27 15:31 ` [PATCH v2 08/10] spi: fsl-qspi: Propagate clock errors from fsl_qspi_select_mem() Lee Jones
2026-11-30 3:32 ` Bough Chen
2026-12-01 9:05 ` Frieder Schrempf [this message]
2026-11-27 15:31 ` [PATCH v2 09/10] spi: cadence-xspi: Advance tx pointer between Marvell b0 chunks Lee Jones
2026-11-27 15:31 ` [PATCH v2 10/10] spi: cadence-xspi: Skip tail read for qword-aligned Marvell b0 receives Lee Jones
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=a502c118-5ba4-4f27-9c23-c0ffe0cb3f0e@kontron.de \
--to=frieder.schrempf@kontron.de \
--cc=bbrezillon@kernel.org \
--cc=broonie@kernel.org \
--cc=han.xu@nxp.com \
--cc=imx@lists.linux.dev \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=suresh.gupta@nxp.com \
--cc=yogeshnarayan.gaur@nxp.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®