aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Moore <dcm@acm.org>2007-02-21 14:37:44 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2007-03-02 16:32:46 -0800
commitbcaaa45c3feb2fcc36a247011970d5026c286154 (patch)
tree57f761857c52b35f9f46e692f8235cab32a4e44c
parentc19eb9e045471c2a32ed0a6e01f1351891995d3b (diff)
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: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--lib/swiotlb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index 10625785eef..d6d57fb475e 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -750,7 +750,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);
}