spi: spi-ti-qspi: Suspend the queue before removing the device
PATCH RESEND 1/1 spi: spi-ti-qspi: Suspend the queue before removing the device
From: Jean-Jacques Hiblot <[email protected]>
Before disabling the pm_runtime, we must ensure that there is no transfer in progress nor will a new one be started. Otherwise the message pump will fail and in the end, the process requesting the transfer will be stuck. This behavior has been observed when transferring data from a SPI flash with dd while removing the module on a DRA7x-evm.
---
Resending because I forgot to add Mark Brown in the loop the first time. Sorry for the noise.
drivers/spi/spi-ti-qspi.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/spi/spi-ti-qspi.c +7 -0
@@ -646,6 +646,13 @@ free_master: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; +pm_runtime_put_sync (&pdev->dev);pm_runtime_disable (&pdev->dev);
Signature · 6 lines
1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 1 line · Jean-Jacques Hiblot
From: Jean-Jacques Hiblot <[email protected]>
Please fix your mail configuration and/or signoff such that they come from the same address - having a patch that looks like it comes from a different address with only one signoff is a warning sign that they're wrong.