projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
83fcaf7
)
sparc64: zero out dma_length
author
FUJITA Tomonori
<fujita.tomonori@lab.ntt.co.jp>
Tue, 23 Oct 2007 10:58:39 +0000
(12:58 +0200)
committer
Jens Axboe
<jens.axboe@oracle.com>
Tue, 23 Oct 2007 10:58:39 +0000
(12:58 +0200)
zero out dma_length in the entry immediately following the last mapped
entry for unmap_sg.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
arch/sparc64/kernel/iommu_common.c
patch
|
blob
|
history
diff --git
a/arch/sparc64/kernel/iommu_common.c
b/arch/sparc64/kernel/iommu_common.c
index
78e8277
..
b70324e
100644
(file)
--- a/
arch/sparc64/kernel/iommu_common.c
+++ b/
arch/sparc64/kernel/iommu_common.c
@@
-233,6
+233,11
@@
unsigned long prepare_sg(struct scatterlist *sg, int nents)
dma_sg->dma_address = dent_addr;
dma_sg->dma_length = dent_len;
+ if (dma_sg != sg) {
+ dma_sg = next_sg(dma_sg);
+ dma_sg->dma_length = 0;
+ }
+
return ((unsigned long) dent_addr +
(unsigned long) dent_len +
(IO_PAGE_SIZE - 1UL)) >> IO_PAGE_SHIFT;