Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b07af760c9bd8e87c3aa9275298566379ec4e9c1
Commit:     b07af760c9bd8e87c3aa9275298566379ec4e9c1
Parent:     157cc5aad94fb7025c41a60788c1bfb5299010aa
Author:     Sonic Zhang <[EMAIL PROTECTED]>
AuthorDate: Thu Jul 12 12:18:08 2007 +0800
Committer:  Bryan Wu <[EMAIL PROTECTED]>
CommitDate: Thu Jul 12 12:18:08 2007 +0800

    Blackfin arch: fix bug set dma_address properly in dma_map_sg
    
    Signed-off-by: Sonic Zhang <[EMAIL PROTECTED]>
    Signed-off-by: Bryan Wu <[EMAIL PROTECTED]>
---
 arch/blackfin/kernel/dma-mapping.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/arch/blackfin/kernel/dma-mapping.c 
b/arch/blackfin/kernel/dma-mapping.c
index bda57ec..ea48d5b 100644
--- 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;
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to