Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b07af760 authored by Sonic Zhang's avatar Sonic Zhang Committed by Bryan Wu
Browse files

Blackfin arch: fix bug set dma_address properly in dma_map_sg

parent 157cc5aa
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -159,10 +159,13 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,

	BUG_ON(direction == DMA_NONE);

	for (i = 0; i < nents; i++)
		invalidate_dcache_range(sg_dma_address(&sg[i]),
					sg_dma_address(&sg[i]) +
					sg_dma_len(&sg[i]));
	for (i = 0; i < nents; i++, sg++) {
		sg->dma_address = page_address(sg->page) + sg->offset;

		invalidate_dcache_range(sg_dma_address(sg),
					sg_dma_address(sg) +
					sg_dma_len(sg));
	}

	return nents;
}