* [PATCH] spi: spi-ti-qspi: Suspend the queue before removing the device @ 2016-05-17 11:57 Jean-Jacques Hiblot [not found] ` <1463486227-6110-1-git-send-email-x0248073-l0cyMroinI0@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Jean-Jacques Hiblot @ 2016-05-17 11:57 UTC (permalink / raw) To: linux-spi-u79uwXL29TY76Z2rM5mHXA Cc: vigneshr-l0cyMroinI0, Jean-Jacques Hiblot From: Jean-Jacques Hiblot <jjhiblot-l0cyMroinI0@public.gmane.org> 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. Signed-off-by: Jean-Jacques Hiblot <jjhiblot-l0cyMroinI0@public.gmane.org> --- drivers/spi/spi-ti-qspi.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c index 443f664..29ea8d2 100644 --- a/drivers/spi/spi-ti-qspi.c +++ b/drivers/spi/spi-ti-qspi.c @@ -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); -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 6+ messages in thread
[parent not found: <1463486227-6110-1-git-send-email-x0248073-l0cyMroinI0@public.gmane.org>]
* Re: [PATCH] spi: spi-ti-qspi: Suspend the queue before removing the device [not found] ` <1463486227-6110-1-git-send-email-x0248073-l0cyMroinI0@public.gmane.org> @ 2016-05-31 14:45 ` Jean-Jacques Hiblot [not found] ` <574DA3A1.9020307-l0cyMroinI0@public.gmane.org> 2016-05-31 17:52 ` Applied "spi: spi-ti-qspi: Suspend the queue before removing the device" to the spi tree Mark Brown 1 sibling, 1 reply; 6+ messages in thread From: Jean-Jacques Hiblot @ 2016-05-31 14:45 UTC (permalink / raw) To: broonie-DgEjT+Ai2ygdnm+yROfE0A Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA, vigneshr-l0cyMroinI0 gentle ping. Any objection to fix this particular issue in this way ? Should it be fixed at the core level ? Thanks, Jean-Jacques On 17/05/2016 13:57, Jean-Jacques Hiblot wrote: > From: Jean-Jacques Hiblot <jjhiblot-l0cyMroinI0@public.gmane.org> > > 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. > > Signed-off-by: Jean-Jacques Hiblot <jjhiblot-l0cyMroinI0@public.gmane.org> > --- > drivers/spi/spi-ti-qspi.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c > index 443f664..29ea8d2 100644 > --- a/drivers/spi/spi-ti-qspi.c > +++ b/drivers/spi/spi-ti-qspi.c > @@ -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); > -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <574DA3A1.9020307-l0cyMroinI0@public.gmane.org>]
* Re: [PATCH] spi: spi-ti-qspi: Suspend the queue before removing the device [not found] ` <574DA3A1.9020307-l0cyMroinI0@public.gmane.org> @ 2016-05-31 15:18 ` Mark Brown [not found] ` <20160531151821.GE29837-GFdadSzt00ze9xe1eoZjHA@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Mark Brown @ 2016-05-31 15:18 UTC (permalink / raw) To: Jean-Jacques Hiblot Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA, vigneshr-l0cyMroinI0 [-- Attachment #1: Type: text/plain, Size: 1030 bytes --] On Tue, May 31, 2016 at 04:45:53PM +0200, Jean-Jacques Hiblot wrote: > gentle ping. > > Any objection to fix this particular issue in this way ? Should it be fixed > at the core level ? Please don't send content free pings and please allow a reasonable time for review. People get busy, go on holiday, attend conferences and so on so unless there is some reason for urgency (like critical bug fixes) please allow at least a couple of weeks for review. If there have been review comments then people may be waiting for those to be addressed. Sending content free pings just adds to the mail volume (if they are seen at all) and if something has gone wrong you'll have to resend the patches anyway. In this case you've never sent me the patch so I've not seen it. Please don't top post, reply in line with needed context. This allows readers to readily follow the flow of conversation and understand what you are talking about and also helps ensure that everything in the discussion is being addressed. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 473 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <20160531151821.GE29837-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>]
* Re: [PATCH] spi: spi-ti-qspi: Suspend the queue before removing the device [not found] ` <20160531151821.GE29837-GFdadSzt00ze9xe1eoZjHA@public.gmane.org> @ 2016-05-31 15:33 ` Jean-Jacques Hiblot [not found] ` <574DAEC3.4040605-l0cyMroinI0@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Jean-Jacques Hiblot @ 2016-05-31 15:33 UTC (permalink / raw) To: Mark Brown; +Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA, vigneshr-l0cyMroinI0 On 31/05/2016 17:18, Mark Brown wrote: > On Tue, May 31, 2016 at 04:45:53PM +0200, Jean-Jacques Hiblot wrote: >> gentle ping. >> >> Any objection to fix this particular issue in this way ? Should it be fixed >> at the core level ? > Please don't send content free pings and please allow a reasonable time > for review. People get busy, go on holiday, attend conferences and so > on so unless there is some reason for urgency (like critical bug fixes) > please allow at least a couple of weeks for review. If there have been > review comments then people may be waiting for those to be addressed. > Sending content free pings just adds to the mail volume (if they are > seen at all) and if something has gone wrong you'll have to resend the > patches anyway. > > In this case you've never sent me the patch so I've not seen it. I had just noticed that I forgot to add you in the loop. That's actually the reason why I sent the ping, not to push you. Jean-Jacques > > Please don't top post, reply in line with needed context. This allows > readers to readily follow the flow of conversation and understand what > you are talking about and also helps ensure that everything in the > discussion is being addressed. -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <574DAEC3.4040605-l0cyMroinI0@public.gmane.org>]
* Re: [PATCH] spi: spi-ti-qspi: Suspend the queue before removing the device [not found] ` <574DAEC3.4040605-l0cyMroinI0@public.gmane.org> @ 2016-05-31 15:37 ` Mark Brown 0 siblings, 0 replies; 6+ messages in thread From: Mark Brown @ 2016-05-31 15:37 UTC (permalink / raw) To: Jean-Jacques Hiblot Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA, vigneshr-l0cyMroinI0 [-- Attachment #1: Type: text/plain, Size: 405 bytes --] On Tue, May 31, 2016 at 05:33:23PM +0200, Jean-Jacques Hiblot wrote: > On 31/05/2016 17:18, Mark Brown wrote: > > In this case you've never sent me the patch so I've not seen it. > I had just noticed that I forgot to add you in the loop. That's actually the > reason why I sent the ping, not to push you. I can't apply patches that are quoted in replies to other messages, please send the patch again. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 473 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Applied "spi: spi-ti-qspi: Suspend the queue before removing the device" to the spi tree [not found] ` <1463486227-6110-1-git-send-email-x0248073-l0cyMroinI0@public.gmane.org> 2016-05-31 14:45 ` Jean-Jacques Hiblot @ 2016-05-31 17:52 ` Mark Brown 1 sibling, 0 replies; 6+ messages in thread From: Mark Brown @ 2016-05-31 17:52 UTC (permalink / raw) To: Jean-Jacques Hiblot Cc: Mark Brown, linux-spi-u79uwXL29TY76Z2rM5mHXA, vigneshr-l0cyMroinI0 The patch spi: spi-ti-qspi: Suspend the queue before removing the device has been applied to the spi tree at git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From 3ac066e2227cb272c097f34475247fa0a6cdd2ff Mon Sep 17 00:00:00 2001 From: Jean-Jacques Hiblot <jjhiblot-l0cyMroinI0@public.gmane.org> Date: Tue, 31 May 2016 17:56:23 +0200 Subject: [PATCH] spi: spi-ti-qspi: Suspend the queue before removing the device 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. Signed-off-by: Jean-Jacques Hiblot <jjhiblot-l0cyMroinI0@public.gmane.org> Signed-off-by: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> --- drivers/spi/spi-ti-qspi.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c index 443f664534e1..29ea8d2f9824 100644 --- a/drivers/spi/spi-ti-qspi.c +++ b/drivers/spi/spi-ti-qspi.c @@ -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); -- 2.8.1 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-05-31 17:52 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2016-05-17 11:57 [PATCH] spi: spi-ti-qspi: Suspend the queue before removing the device Jean-Jacques Hiblot [not found] ` <1463486227-6110-1-git-send-email-x0248073-l0cyMroinI0@public.gmane.org> 2016-05-31 14:45 ` Jean-Jacques Hiblot [not found] ` <574DA3A1.9020307-l0cyMroinI0@public.gmane.org> 2016-05-31 15:18 ` Mark Brown [not found] ` <20160531151821.GE29837-GFdadSzt00ze9xe1eoZjHA@public.gmane.org> 2016-05-31 15:33 ` Jean-Jacques Hiblot [not found] ` <574DAEC3.4040605-l0cyMroinI0@public.gmane.org> 2016-05-31 15:37 ` Mark Brown 2016-05-31 17:52 ` Applied "spi: spi-ti-qspi: Suspend the queue before removing the device" to the spi tree Mark Brown
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.