Skip to contentSkip to conversation

FAILED: patch "[PATCH] spi: cadence-quadspi: fix controller deregistration" failed to apply to 6.12-stable tree

PATCH [email protected] 1 participant 1 message May 15

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 6.12-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y
git checkout FETCH_HEAD
git cherry-pick -x 964ee9793760e825b5c011741b4e3cfe06c87efc
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026051513-swapping-graffiti-4d54@gregkh' --subject-prefix 'PATCH 6.12.y' HEAD^..

Possible dependencies:

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 964ee9793760e825b5c011741b4e3cfe06c87efc Mon Sep 17 00:00:00 2001
From: Johan Hovold <[email protected]>
Date: Tue, 14 Apr 2026 15:43:13 +0200
Subject: [PATCH] spi: cadence-quadspi: fix controller deregistration

Make sure to deregister the controller before dropping the reference count that allows new operations to start to allow SPI drivers to do I/O during deregistration.

Fixes 7446284023e8 ("spi: cadence-quadspi: Implement refcount to handle unbind during busy")
Cc Khairul Anuar Romli <[email protected]>
drivers/spi/spi-cadence-quadspi.c +2 -2
index 2ead419e896e..50ef65fc5ded 100644
@@ -2020,13 +2020,13 @@ static void cqspi_remove(struct platform_device *pdev)
 
 	ddata = of_device_get_match_data(dev);
 
+	spi_unregister_controller(cqspi->host);
+
 	refcount_set(&cqspi->refcount, 0);
 
 	if (!refcount_dec_and_test(&cqspi->inflight_ops))
 		cqspi_wait_idle(cqspi);
 
-	spi_unregister_controller(cqspi->host);
-
 	if (cqspi->rx_chan)
 		dma_release_channel(cqspi->rx_chan);