mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
Blackfin arch: fix bug set dma_address properly in dma_map_sg
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
This commit is contained in:
parent
157cc5aad9
commit
b07af760c9
1 changed files with 7 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue