From: Thomas Bogendoerfer Date: Fri, 18 May 2007 12:32:36 +0000 (+0200) Subject: [MIPS] Make dma_map_sg handle sg elements which are longer than one page X-Git-Tag: v2.6.22-rc5~98^2~4 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fbd5604d56c4543457aeae6dda69c9b8a1405474;p=linux-2.6 [MIPS] Make dma_map_sg handle sg elements which are longer than one page Signed-off-by: Thomas Bogendoerfer Signed-off-by: Ralf Baechle --- diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c index f0eb29917d..76903c7276 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;