linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jean-Jacques Hiblot <x0248073-l0cyMroinI0@public.gmane.org>
To: <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: <linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	<vigneshr-l0cyMroinI0@public.gmane.org>
Subject: Re: [PATCH] spi: spi-ti-qspi: Suspend the queue before removing the device
Date: Tue, 31 May 2016 16:45:53 +0200	[thread overview]
Message-ID: <574DA3A1.9020307@ti.com> (raw)
In-Reply-To: <1463486227-6110-1-git-send-email-x0248073-l0cyMroinI0@public.gmane.org>

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

  parent reply	other threads:[~2016-05-31 14:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
     [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

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=574DA3A1.9020307@ti.com \
    --to=x0248073-l0cymroini0@public.gmane.org \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=vigneshr-l0cyMroinI0@public.gmane.org \
    /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;
as well as URLs for NNTP newsgroup(s).