diff options
Diffstat (limited to 'drivers/xen/swiotlb-xen.c')
-rw-r--r-- | drivers/xen/swiotlb-xen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index 8a6035aa69c9..4cedc284b5df 100644 --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c | |||
@@ -364,7 +364,7 @@ dma_addr_t xen_swiotlb_map_page(struct device *dev, struct page *page, | |||
364 | * Ensure that the address returned is DMA'ble | 364 | * Ensure that the address returned is DMA'ble |
365 | */ | 365 | */ |
366 | if (!dma_capable(dev, dev_addr, size)) { | 366 | if (!dma_capable(dev, dev_addr, size)) { |
367 | swiotlb_tbl_unmap_single(dev, phys_to_virt(map), size, dir); | 367 | swiotlb_tbl_unmap_single(dev, map, size, dir); |
368 | dev_addr = 0; | 368 | dev_addr = 0; |
369 | } | 369 | } |
370 | return dev_addr; | 370 | return dev_addr; |
@@ -388,7 +388,7 @@ static void xen_unmap_single(struct device *hwdev, dma_addr_t dev_addr, | |||
388 | 388 | ||
389 | /* NOTE: We use dev_addr here, not paddr! */ | 389 | /* NOTE: We use dev_addr here, not paddr! */ |
390 | if (is_xen_swiotlb_buffer(dev_addr)) { | 390 | if (is_xen_swiotlb_buffer(dev_addr)) { |
391 | swiotlb_tbl_unmap_single(hwdev, phys_to_virt(paddr), size, dir); | 391 | swiotlb_tbl_unmap_single(hwdev, paddr, size, dir); |
392 | return; | 392 | return; |
393 | } | 393 | } |
394 | 394 | ||