All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dma: tegra: use sg_dma_address() for getting dma buffer address
@ 2012-06-22 15:11 ` Laxman Dewangan
  0 siblings, 0 replies; 5+ messages in thread
From: Laxman Dewangan @ 2012-06-22 15:11 UTC (permalink / raw)
  To: vinod.koul-ral2JQCrhuEAvxtiuMwx3w,
	dan.j.williams-ral2JQCrhuEAvxtiuMwx3w
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Laxman Dewangan

Use the sg_dma_address() to get the segment buffer address for
DMA transfer in place of sg_phys() which returns the physical
address of an sg entry.
The sg_dma_address() returns the correct buffer memory address
for DMA transfer.

Signed-off-by: Laxman Dewangan <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 drivers/dma/tegra20-apb-dma.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
index 2e4c187..a46a21c 100644
--- a/drivers/dma/tegra20-apb-dma.c
+++ b/drivers/dma/tegra20-apb-dma.c
@@ -929,7 +929,7 @@ static struct dma_async_tx_descriptor *tegra_dma_prep_slave_sg(
 	for_each_sg(sgl, sg, sg_len, i) {
 		u32 len, mem;
 
-		mem = sg_phys(sg);
+		mem = sg_dma_address(sg);
 		len = sg_dma_len(sg);
 
 		if ((len & 3) || (mem & 3) ||
-- 
1.7.1.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH] dma: tegra: use sg_dma_address() for getting dma buffer address
@ 2012-06-22 15:11 ` Laxman Dewangan
  0 siblings, 0 replies; 5+ messages in thread
From: Laxman Dewangan @ 2012-06-22 15:11 UTC (permalink / raw)
  To: vinod.koul, dan.j.williams; +Cc: linux-kernel, linux-tegra, Laxman Dewangan

Use the sg_dma_address() to get the segment buffer address for
DMA transfer in place of sg_phys() which returns the physical
address of an sg entry.
The sg_dma_address() returns the correct buffer memory address
for DMA transfer.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
 drivers/dma/tegra20-apb-dma.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
index 2e4c187..a46a21c 100644
--- a/drivers/dma/tegra20-apb-dma.c
+++ b/drivers/dma/tegra20-apb-dma.c
@@ -929,7 +929,7 @@ static struct dma_async_tx_descriptor *tegra_dma_prep_slave_sg(
 	for_each_sg(sgl, sg, sg_len, i) {
 		u32 len, mem;
 
-		mem = sg_phys(sg);
+		mem = sg_dma_address(sg);
 		len = sg_dma_len(sg);
 
 		if ((len & 3) || (mem & 3) ||
-- 
1.7.1.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] dma: tegra: use sg_dma_address() for getting dma buffer address
  2012-06-22 15:11 ` Laxman Dewangan
  (?)
@ 2012-06-22 17:12 ` Stephen Warren
       [not found]   ` <4FE4A78F.4090307-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
  -1 siblings, 1 reply; 5+ messages in thread
From: Stephen Warren @ 2012-06-22 17:12 UTC (permalink / raw)
  To: Laxman Dewangan; +Cc: vinod.koul, dan.j.williams, linux-kernel, linux-tegra

On 06/22/2012 09:11 AM, Laxman Dewangan wrote:
> Use the sg_dma_address() to get the segment buffer address for
> DMA transfer in place of sg_phys() which returns the physical
> address of an sg entry.
> The sg_dma_address() returns the correct buffer memory address
> for DMA transfer.

It's what everyone else is doing, so:
Acked-by: Stephen Warren <swarren@wwwdotorg.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] dma: tegra: use sg_dma_address() for getting dma buffer address
  2012-06-22 17:12 ` Stephen Warren
@ 2012-06-27 13:32       ` Vinod Koul
  0 siblings, 0 replies; 5+ messages in thread
From: Vinod Koul @ 2012-06-27 13:32 UTC (permalink / raw)
  To: Stephen Warren
  Cc: Laxman Dewangan, dan.j.williams-ral2JQCrhuEAvxtiuMwx3w,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

On Fri, 2012-06-22 at 11:12 -0600, Stephen Warren wrote:
> On 06/22/2012 09:11 AM, Laxman Dewangan wrote:
> > Use the sg_dma_address() to get the segment buffer address for
> > DMA transfer in place of sg_phys() which returns the physical
> > address of an sg entry.
> > The sg_dma_address() returns the correct buffer memory address
> > for DMA transfer.
> 
> It's what everyone else is doing, so:
And this is the right thing to do. 
> Acked-by: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>

Applied, thanks

-- 
~Vinod

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] dma: tegra: use sg_dma_address() for getting dma buffer address
@ 2012-06-27 13:32       ` Vinod Koul
  0 siblings, 0 replies; 5+ messages in thread
From: Vinod Koul @ 2012-06-27 13:32 UTC (permalink / raw)
  To: Stephen Warren; +Cc: Laxman Dewangan, dan.j.williams, linux-kernel, linux-tegra

On Fri, 2012-06-22 at 11:12 -0600, Stephen Warren wrote:
> On 06/22/2012 09:11 AM, Laxman Dewangan wrote:
> > Use the sg_dma_address() to get the segment buffer address for
> > DMA transfer in place of sg_phys() which returns the physical
> > address of an sg entry.
> > The sg_dma_address() returns the correct buffer memory address
> > for DMA transfer.
> 
> It's what everyone else is doing, so:
And this is the right thing to do. 
> Acked-by: Stephen Warren <swarren@wwwdotorg.org>

Applied, thanks

-- 
~Vinod


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-06-27 13:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-22 15:11 [PATCH] dma: tegra: use sg_dma_address() for getting dma buffer address Laxman Dewangan
2012-06-22 15:11 ` Laxman Dewangan
2012-06-22 17:12 ` Stephen Warren
     [not found]   ` <4FE4A78F.4090307-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-06-27 13:32     ` Vinod Koul
2012-06-27 13:32       ` Vinod Koul

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.