* [PATCH RESEND] omap_hsmmc: use original sg_len for dma_unmap_sg
@ 2011-06-17 18:14 ` Per Forlin
0 siblings, 0 replies; 4+ messages in thread
From: Per Forlin @ 2011-06-17 18:14 UTC (permalink / raw)
To: linux-mmc, linux-arm-kernel, linaro-dev, Venkatraman S
Cc: Chris Ball, Per Forlin
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;
--
1.7.4.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH RESEND] omap_hsmmc: use original sg_len for dma_unmap_sg
@ 2011-06-17 18:14 ` Per Forlin
0 siblings, 0 replies; 4+ messages in thread
From: Per Forlin @ 2011-06-17 18:14 UTC (permalink / raw)
To: linux-arm-kernel
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;
--
1.7.4.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH RESEND] omap_hsmmc: use original sg_len for dma_unmap_sg
2011-06-17 18:14 ` Per Forlin
@ 2011-06-19 3:20 ` Chris Ball
-1 siblings, 0 replies; 4+ messages in thread
From: Chris Ball @ 2011-06-19 3:20 UTC (permalink / raw)
To: Per Forlin; +Cc: linux-mmc, linux-arm-kernel, linaro-dev, Venkatraman S
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH RESEND] omap_hsmmc: use original sg_len for dma_unmap_sg
@ 2011-06-19 3:20 ` Chris Ball
0 siblings, 0 replies; 4+ messages in thread
From: Chris Ball @ 2011-06-19 3:20 UTC (permalink / raw)
To: linux-arm-kernel
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-06-19 3:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-17 18:14 [PATCH RESEND] omap_hsmmc: use original sg_len for dma_unmap_sg Per Forlin
2011-06-17 18:14 ` Per Forlin
2011-06-19 3:20 ` Chris Ball
2011-06-19 3:20 ` Chris Ball
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.