public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Ball <cjb@laptop.org>
To: Per Forlin <per.forlin@linaro.org>
Cc: linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linaro-dev@lists.linaro.org, Venkatraman S <svenkatr@ti.com>
Subject: Re: [PATCH RESEND] omap_hsmmc: use original sg_len for dma_unmap_sg
Date: Sat, 18 Jun 2011 23:20:25 -0400	[thread overview]
Message-ID: <m2tybmzeva.fsf@bob.laptop.org> (raw)
In-Reply-To: <1308334461-3869-1-git-send-email-per.forlin@linaro.org> (Per Forlin's message of "Fri, 17 Jun 2011 20:14:21 +0200")

Hi Per,

On Fri, Jun 17 2011, Per Forlin wrote:
> Don't use the returned sg_len from dma_map_sg() as inparameter
> to dma_unmap_sg(). Use the original sg_len for both dma_map_sg
> and dma_unmap_sg according to the documentation in DMA-API.txt.
>
> Signed-off-by: Per Forlin <per.forlin@linaro.org>
> Reviewed-by: Venkatraman S <svenkatr@ti.com>
> ---
>  drivers/mmc/host/omap_hsmmc.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index 259ece0..ad3731a 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -959,7 +959,8 @@ static void omap_hsmmc_dma_cleanup(struct omap_hsmmc_host *host, int errno)
>  	spin_unlock(&host->irq_lock);
>  
>  	if (host->use_dma && dma_ch != -1) {
> -		dma_unmap_sg(mmc_dev(host->mmc), host->data->sg, host->dma_len,
> +		dma_unmap_sg(mmc_dev(host->mmc), host->data->sg,
> +			host->data->sg_len,
>  			omap_hsmmc_get_dma_dir(host, host->data));
>  		omap_free_dma(dma_ch);
>  	}
> @@ -1343,7 +1344,7 @@ static void omap_hsmmc_dma_cb(int lch, u16 ch_status, void *cb_data)
>  		return;
>  	}
>  
> -	dma_unmap_sg(mmc_dev(host->mmc), data->sg, host->dma_len,
> +	dma_unmap_sg(mmc_dev(host->mmc), data->sg, data->sg_len,
>  		omap_hsmmc_get_dma_dir(host, data));
>  
>  	req_in_progress = host->req_in_progress;

Pushed to mmc-next for 3.0-rc, thanks.

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

      reply	other threads:[~2011-06-19  3:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-17 18:14 [PATCH RESEND] omap_hsmmc: use original sg_len for dma_unmap_sg Per Forlin
2011-06-19  3:20 ` Chris Ball [this message]

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=m2tybmzeva.fsf@bob.laptop.org \
    --to=cjb@laptop.org \
    --cc=linaro-dev@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=per.forlin@linaro.org \
    --cc=svenkatr@ti.com \
    /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