Skip to contentSkip to conversation

dma: tegra: use sg_dma_address() for getting dma buffer address

PATCH Applied Laxman Dewangan 3 participants 3 messages Jun 22, 2012 – Jun 27, 2012

Subsystems (3)
lore
Share & tools
lore

Laxman Dewangan

author maintainer
#0 lore raw

PATCH 1/1 dma: tegra: use sg_dma_address() for getting dma buffer address

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.

---
 drivers/dma/tegra20-apb-dma.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/dma/tegra20-apb-dma.c +1 -1
index 2e4c187..a46a21c 100644
@@ -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) ||
Signature · 1 line
1.7.1.1
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · 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.

It's what everyone else is doing, so:

Applied
#2 lore raw
Quoted 8 lines · Stephen Warren
Quoted 5 lines · 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.

It's what everyone else is doing, so:

And this is the right thing to do.

Quoted 1 line

Applied, thanks

Signature · 1 line
~Vinod