aboutsummaryrefslogtreecommitdiffstats
path: root/lib/swiotlb.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2005-12-31 13:27:22 -0500
committerSteve French <sfrench@us.ibm.com>2005-12-31 13:27:22 -0500
commiteea60caef610c7a6c58c0de9c80ae1e438e01301 (patch)
tree25e19289bba003fe085e589430d0d981fd6b73a7 /lib/swiotlb.c
parentda8543ef125afc7bba4da526b61a1ae07dc25109 (diff)
parent82c9df820112c6286a8e8fbe482e94b65b49062c (diff)
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'lib/swiotlb.c')
-rw-r--r--lib/swiotlb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index 57216f3544ca..1ff8dcebf7c6 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -704,8 +704,9 @@ swiotlb_map_sg(struct device *hwdev, struct scatterlist *sg, int nelems,
704 addr = SG_ENT_VIRT_ADDRESS(sg); 704 addr = SG_ENT_VIRT_ADDRESS(sg);
705 dev_addr = virt_to_phys(addr); 705 dev_addr = virt_to_phys(addr);
706 if (swiotlb_force || address_needs_mapping(hwdev, dev_addr)) { 706 if (swiotlb_force || address_needs_mapping(hwdev, dev_addr)) {
707 sg->dma_address = (dma_addr_t) virt_to_phys(map_single(hwdev, addr, sg->length, dir)); 707 void *map = map_single(hwdev, addr, sg->length, dir);
708 if (!sg->dma_address) { 708 sg->dma_address = virt_to_bus(map);
709 if (!map) {
709 /* Don't panic here, we expect map_sg users 710 /* Don't panic here, we expect map_sg users
710 to do proper error handling. */ 711 to do proper error handling. */
711 swiotlb_full(hwdev, sg->length, dir, 0); 712 swiotlb_full(hwdev, sg->length, dir, 0);