FAILED: patch "[PATCH] spi: ti-qspi: fix controller deregistration" failed to apply to 5.10-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 5.10-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-5.10.y
git checkout FETCH_HEAD
git cherry-pick -x 0c18a1bacbb1d8b8aa34d3d004a2cb8226c8b1ea
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026051216-outboard-easel-dbcb@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 0c18a1bacbb1d8b8aa34d3d004a2cb8226c8b1ea Mon Sep 17 00:00:00 2001
From: Johan Hovold <[email protected]>
Date: Fri, 10 Apr 2026 10:17:53 +0200
Subject: [PATCH] spi: ti-qspi: fix controller deregistration
Make sure to deregister the controller before disabling underlying resources like clocks during driver unbind.
Note that the controller is suspended before disabling and releasing resources since commit 3ac066e2227c ("spi: spi-ti-qspi: Suspend the queue before removing the device") which avoids issues like unclocked accesses but prevents SPI device drivers from doing I/O during deregistration.
drivers/spi/spi-ti-qspi.c +6 -8
@@ -888,7 +888,7 @@ static int ti_qspi_probe(struct platform_device *pdev) qspi->mmap_enabled = false; qspi->current_cs =-1 ; - ret =devm_spi_register_controller (&pdev->dev, host); + ret =spi_register_controller (host);if (!ret)return 0 ;
@@ -903,19 +903,17 @@ static int ti_qspi_probe(struct platform_device *pdev)static void ti_qspi_remove (struct platform_device *pdev) {struct ti_qspi *qspi =platform_get_drvdata (pdev); -int rc; - rc =spi_controller_suspend (qspi->host); -if (rc) { -dev_alert (&pdev->dev,"spi_controller_suspend() failed (%pe)\n" , -ERR_PTR (rc)); -return ; - } +spi_controller_get (qspi->host); + +spi_unregister_controller (qspi->host);pm_runtime_put_sync (&pdev->dev);pm_runtime_disable (&pdev->dev);ti_qspi_dma_cleanup (qspi); + +spi_controller_put (qspi->host); }static const struct dev_pm_ops ti_qspi_pm_ops = {
Sasha Levin
maintainerPATCH 1/1 spi: ti-qspi: fix controller deregistration
From: Johan Hovold <[email protected]>
[ Upstream commit 0c18a1bacbb1d8b8aa34d3d004a2cb8226c8b1ea ]
Make sure to deregister the controller before disabling underlying resources like clocks during driver unbind.
Note that the controller is suspended before disabling and releasing resources since commit 3ac066e2227c ("spi: spi-ti-qspi: Suspend the queue before removing the device") which avoids issues like unclocked accesses but prevents SPI device drivers from doing I/O during deregistration.
--- drivers/spi/spi-ti-qspi.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/spi/spi-ti-qspi.c +6 -5
@@ -894,7 +894,7 @@ static int ti_qspi_probe(struct platform_device *pdev) qspi->mmap_enabled = false; qspi->current_cs =-1 ; - ret =devm_spi_register_master (&pdev->dev, master); + ret =spi_register_master (master);if (!ret)return 0 ;
@@ -909,17 +909,18 @@ static int ti_qspi_probe(struct platform_device *pdev)static int ti_qspi_remove (struct platform_device *pdev) {struct ti_qspi *qspi =platform_get_drvdata (pdev); -int rc; - rc =spi_master_suspend (qspi->master); -if (rc) -return rc; +spi_master_get (qspi->master); + +spi_unregister_master (qspi->master);pm_runtime_put_sync (&pdev->dev);pm_runtime_disable (&pdev->dev);ti_qspi_dma_cleanup (qspi); +spi_master_put (qspi->master); +return 0 ; }
Signature · 1 line
2.53.0