All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Ball <cjb@laptop.org>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: linux-sh@vger.kernel.org, linux-mmc@vger.kernel.org,
	Magnus Damm <damm@opensource.se>,
	Simon Horman <horms@verge.net.au>,
	Ian Molton <ian@mnementh.co.uk>
Subject: Re: [PATCH] mmc: tmio: fix PM in DMA mode
Date: Tue, 10 May 2011 21:20:37 -0400	[thread overview]
Message-ID: <m3fwom6niy.fsf@pullcord.laptop.org> (raw)
In-Reply-To: <Pine.LNX.4.64.1104291909290.17813@axis700.grange> (Guennadi Liakhovetski's message of "Fri, 29 Apr 2011 19:11:00 +0200 (CEST)")

Hi Guennadi,

On Fri, Apr 29 2011, Guennadi Liakhovetski wrote:
> DMA mode has to be re-enabled during a resume.
>
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> ---
>  drivers/mmc/host/tmio_mmc_dma.c |   21 ++++++++++++---------
>  drivers/mmc/host/tmio_mmc_pio.c |    1 +
>  2 files changed, 13 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/mmc/host/tmio_mmc_dma.c b/drivers/mmc/host/tmio_mmc_dma.c
> index d3de74a..25f1ad6 100644
> --- a/drivers/mmc/host/tmio_mmc_dma.c
> +++ b/drivers/mmc/host/tmio_mmc_dma.c
> @@ -256,7 +256,10 @@ static bool tmio_mmc_filter(struct dma_chan *chan, void *arg)
>  void tmio_mmc_request_dma(struct tmio_mmc_host *host, struct tmio_mmc_data *pdata)
>  {
>  	/* We can only either use DMA for both Tx and Rx or not use it at all */
> -	if (pdata->dma) {
> +	if (!pdata->dma)
> +		return;
> +
> +	if (!host->chan_tx && !host->chan_rx) {
>  		dma_cap_mask_t mask;
>  
>  		dma_cap_zero(mask);
> @@ -284,18 +287,18 @@ void tmio_mmc_request_dma(struct tmio_mmc_host *host, struct tmio_mmc_data *pdat
>  
>  		tasklet_init(&host->dma_complete, tmio_mmc_tasklet_fn, (unsigned long)host);
>  		tasklet_init(&host->dma_issue, tmio_mmc_issue_tasklet_fn, (unsigned long)host);
> +	}
>  
> -		tmio_mmc_enable_dma(host, true);
> +	tmio_mmc_enable_dma(host, true);
> +
> +	return;
>  
> -		return;
>  ebouncebuf:
> -		dma_release_channel(host->chan_rx);
> -		host->chan_rx = NULL;
> +	dma_release_channel(host->chan_rx);
> +	host->chan_rx = NULL;
>  ereqrx:
> -		dma_release_channel(host->chan_tx);
> -		host->chan_tx = NULL;
> -		return;
> -	}
> +	dma_release_channel(host->chan_tx);
> +	host->chan_tx = NULL;
>  }
>  
>  void tmio_mmc_release_dma(struct tmio_mmc_host *host)
> diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
> index 26598f1..27fc11c 100644
> --- a/drivers/mmc/host/tmio_mmc_pio.c
> +++ b/drivers/mmc/host/tmio_mmc_pio.c
> @@ -995,6 +995,7 @@ int tmio_mmc_host_resume(struct device *dev)
>  		pm_runtime_get_sync(dev);
>  
>  	tmio_mmc_reset(mmc_priv(mmc));
> +	tmio_mmc_request_dma(host, host->pdata);
>  
>  	return mmc_resume_host(mmc);
>  }

This patch doesn't apply against current mmc-next.

Please could you send a full patchset against mmc-next for tmio for .40?

Thanks!

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

WARNING: multiple messages have this Message-ID (diff)
From: Chris Ball <cjb@laptop.org>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: linux-sh@vger.kernel.org, linux-mmc@vger.kernel.org,
	Magnus Damm <damm@opensource.se>,
	Simon Horman <horms@verge.net.au>,
	Ian Molton <ian@mnementh.co.uk>
Subject: Re: [PATCH] mmc: tmio: fix PM in DMA mode
Date: Wed, 11 May 2011 01:20:37 +0000	[thread overview]
Message-ID: <m3fwom6niy.fsf@pullcord.laptop.org> (raw)
In-Reply-To: <Pine.LNX.4.64.1104291909290.17813@axis700.grange> (Guennadi Liakhovetski's message of "Fri, 29 Apr 2011 19:11:00 +0200 (CEST)")

Hi Guennadi,

On Fri, Apr 29 2011, Guennadi Liakhovetski wrote:
> DMA mode has to be re-enabled during a resume.
>
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> ---
>  drivers/mmc/host/tmio_mmc_dma.c |   21 ++++++++++++---------
>  drivers/mmc/host/tmio_mmc_pio.c |    1 +
>  2 files changed, 13 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/mmc/host/tmio_mmc_dma.c b/drivers/mmc/host/tmio_mmc_dma.c
> index d3de74a..25f1ad6 100644
> --- a/drivers/mmc/host/tmio_mmc_dma.c
> +++ b/drivers/mmc/host/tmio_mmc_dma.c
> @@ -256,7 +256,10 @@ static bool tmio_mmc_filter(struct dma_chan *chan, void *arg)
>  void tmio_mmc_request_dma(struct tmio_mmc_host *host, struct tmio_mmc_data *pdata)
>  {
>  	/* We can only either use DMA for both Tx and Rx or not use it at all */
> -	if (pdata->dma) {
> +	if (!pdata->dma)
> +		return;
> +
> +	if (!host->chan_tx && !host->chan_rx) {
>  		dma_cap_mask_t mask;
>  
>  		dma_cap_zero(mask);
> @@ -284,18 +287,18 @@ void tmio_mmc_request_dma(struct tmio_mmc_host *host, struct tmio_mmc_data *pdat
>  
>  		tasklet_init(&host->dma_complete, tmio_mmc_tasklet_fn, (unsigned long)host);
>  		tasklet_init(&host->dma_issue, tmio_mmc_issue_tasklet_fn, (unsigned long)host);
> +	}
>  
> -		tmio_mmc_enable_dma(host, true);
> +	tmio_mmc_enable_dma(host, true);
> +
> +	return;
>  
> -		return;
>  ebouncebuf:
> -		dma_release_channel(host->chan_rx);
> -		host->chan_rx = NULL;
> +	dma_release_channel(host->chan_rx);
> +	host->chan_rx = NULL;
>  ereqrx:
> -		dma_release_channel(host->chan_tx);
> -		host->chan_tx = NULL;
> -		return;
> -	}
> +	dma_release_channel(host->chan_tx);
> +	host->chan_tx = NULL;
>  }
>  
>  void tmio_mmc_release_dma(struct tmio_mmc_host *host)
> diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
> index 26598f1..27fc11c 100644
> --- a/drivers/mmc/host/tmio_mmc_pio.c
> +++ b/drivers/mmc/host/tmio_mmc_pio.c
> @@ -995,6 +995,7 @@ int tmio_mmc_host_resume(struct device *dev)
>  		pm_runtime_get_sync(dev);
>  
>  	tmio_mmc_reset(mmc_priv(mmc));
> +	tmio_mmc_request_dma(host, host->pdata);
>  
>  	return mmc_resume_host(mmc);
>  }

This patch doesn't apply against current mmc-next.

Please could you send a full patchset against mmc-next for tmio for .40?

Thanks!

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

  reply	other threads:[~2011-05-11  1:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-29 17:11 [PATCH] mmc: tmio: fix PM in DMA mode Guennadi Liakhovetski
2011-04-29 17:11 ` Guennadi Liakhovetski
2011-05-11  1:20 ` Chris Ball [this message]
2011-05-11  1:20   ` Chris Ball
2011-05-12  8:17   ` Guennadi Liakhovetski
2011-05-12  8:17     ` Guennadi Liakhovetski
2011-05-12 10:19     ` Guennadi Liakhovetski
2011-05-12 10:19       ` Guennadi Liakhovetski
2011-05-12 22:12       ` Chris Ball
2011-05-12 22:12         ` Chris Ball
2011-05-26  1:24       ` Chris Ball
2011-05-26  1:24         ` Chris Ball

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=m3fwom6niy.fsf@pullcord.laptop.org \
    --to=cjb@laptop.org \
    --cc=damm@opensource.se \
    --cc=g.liakhovetski@gmx.de \
    --cc=horms@verge.net.au \
    --cc=ian@mnementh.co.uk \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-sh@vger.kernel.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 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.