summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorThomas Bogendoerfer <tsbogend@alpha.franken.de>2007-05-18 16:32:36 +0400
committerRalf Baechle <ralf@linux-mips.org>2007-06-06 22:34:32 +0400
commitfbd5604d56c4543457aeae6dda69c9b8a1405474 (patch)
tree5cedd1bc176686fa8176d5159c9db4044bd26a11 /arch
parent1fe5f2c4503cf45806a47c608706fc7892649d4b (diff)
downloadlinux-fbd5604d56c4543457aeae6dda69c9b8a1405474.tar.xz
[MIPS] Make dma_map_sg handle sg elements which are longer than one page
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/mm/dma-default.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c
index f0eb29917d9a..76903c727647 100644
--- a/arch/mips/mm/dma-default.c
+++ b/arch/mips/mm/dma-default.c
@@ -168,8 +168,9 @@ int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
addr = (unsigned long) page_address(sg->page);
if (!plat_device_is_coherent(dev) && addr)
__dma_sync(addr + sg->offset, sg->length, direction);
- sg->dma_address = plat_map_dma_mem_page(dev, sg->page) +
- sg->offset;
+ sg->dma_address = plat_map_dma_mem(dev,
+ (void *)(addr + sg->offset),
+ sg->length);
}
return nents;