aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2007-10-25 09:13:32 +0200
committerJens Axboe <jens.axboe@oracle.com>2007-10-25 09:13:32 +0200
commite88a39dee10d3a506ed8c4ba78cde0dd76a6fc83 (patch)
tree64712b8913a3571f383bcf966e12ffe66d899114 /arch
parentblackfin: fix sg fallout (diff)
downloadlinux-dev-e88a39dee10d3a506ed8c4ba78cde0dd76a6fc83.tar.xz
linux-dev-e88a39dee10d3a506ed8c4ba78cde0dd76a6fc83.zip
x86: pci-gart fix
map_sg could copy the last sg element to another position (if merging some elements). It breaks sg chaining. This copies only dma_address/length instead of the whole sg element. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/pci-gart_64.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c
index c56e9ee64964..ae7e0161ce46 100644
--- a/arch/x86/kernel/pci-gart_64.c
+++ b/arch/x86/kernel/pci-gart_64.c
@@ -338,7 +338,6 @@ static int __dma_map_cont(struct scatterlist *start, int nelems,
BUG_ON(s != start && s->offset);
if (s == start) {
- *sout = *s;
sout->dma_address = iommu_bus_base;
sout->dma_address += iommu_page*PAGE_SIZE + s->offset;
sout->dma_length = s->length;
@@ -365,7 +364,7 @@ static inline int dma_map_cont(struct scatterlist *start, int nelems,
{
if (!need) {
BUG_ON(nelems != 1);
- *sout = *start;
+ sout->dma_address = start->dma_address;
sout->dma_length = start->length;
return 0;
}