]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Missing critical phys_to_virt in lib/swiotlb.c
authorDavid Moore <dcm@acm.org>
Thu, 8 Mar 2007 07:10:34 +0000 (08:10 +0100)
committerAdrian Bunk <bunk@stusta.de>
Thu, 8 Mar 2007 07:10:34 +0000 (08:10 +0100)
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>
lib/swiotlb.c

index 0af497b6b9a87f26b395e281cfd049a76a72ca41..7ca75fc474ed447ccc5a798ec95b8d7be199066d 100644 (file)
@@ -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);
 }