Skip to content

Commit

Permalink
[MIPS] Make dma_map_sg handle sg elements which are longer than one page
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Thomas Bogendoerfer authored and Ralf Baechle committed Jun 6, 2007
1 parent 1fe5f2c commit fbd5604
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions arch/mips/mm/dma-default.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fbd5604

Please sign in to comment.