summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Moore <dcm@acm.org>2007-03-08 10:10:34 +0300
committerAdrian Bunk <bunk@stusta.de>2007-03-08 10:10:34 +0300
commitd4705d6dc74016619a1a6565dd54c7c5269c25d0 (patch)
treecd063dfb1786a5a75c960f4a2699d66e65c46892 /lib
parent4a990d10083535d9f0927cd81dcc3b18d0ec3cac (diff)
downloadlinux-d4705d6dc74016619a1a6565dd54c7c5269c25d0.tar.xz
Missing critical phys_to_virt in lib/swiotlb.c
Adds missing call to phys_to_virt() in the lib/swiotlb.c:swiotlb_sync_sg() function. Without this change, a kernel panic will always occur whenever a SWIOTLB bounce buffer from a scatter-gather list gets synced. Signed-off-by: David Moore <dcm@acm.org> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/swiotlb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index 0af497b6b9a8..7ca75fc474ed 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -758,7 +758,7 @@ swiotlb_sync_sg(struct device *hwdev, struct scatterlist *sg,
for (i = 0; i < nelems; i++, sg++)
if (sg->dma_address != SG_ENT_PHYS_ADDRESS(sg))
- sync_single(hwdev, (void *) sg->dma_address,
+ sync_single(hwdev, phys_to_virt(sg->dma_address),
sg->dma_length, dir, target);
}