projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
157cc5a
)
Blackfin arch: fix bug set dma_address properly in dma_map_sg
author
Sonic Zhang
<sonic.zhang@analog.com>
Thu, 12 Jul 2007 04:18:08 +0000
(12:18 +0800)
committer
Bryan Wu
<bryan.wu@analog.com>
Thu, 12 Jul 2007 04:18:08 +0000
(12:18 +0800)
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
arch/blackfin/kernel/dma-mapping.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/blackfin/kernel/dma-mapping.c
b/arch/blackfin/kernel/dma-mapping.c
index bda57ec88151f961d62021aac673b66b502b86ac..ea48d5b13f11469a18faebbd15461def98ef5d23 100644
(file)
--- a/
arch/blackfin/kernel/dma-mapping.c
+++ b/
arch/blackfin/kernel/dma-mapping.c
@@
-159,10
+159,13
@@
dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
BUG_ON(direction == DMA_NONE);
- for (i = 0; i < nents; i++)
- invalidate_dcache_range(sg_dma_address(&sg[i]),
- sg_dma_address(&sg[i]) +
- sg_dma_len(&sg[i]));
+ for (i = 0; i < nents; i++, sg++) {
+ sg->dma_address = page_address(sg->page) + sg->offset;
+
+ invalidate_dcache_range(sg_dma_address(sg),
+ sg_dma_address(sg) +
+ sg_dma_len(sg));
+ }
return nents;
}