diff options
Diffstat (limited to 'drivers/xen/swiotlb-xen.c')
| -rw-r--r-- | drivers/xen/swiotlb-xen.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index 87e6035c9e81..b8014bf2b2ed 100644 --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c | |||
| @@ -416,11 +416,12 @@ dma_addr_t xen_swiotlb_map_page(struct device *dev, struct page *page, | |||
| 416 | /* | 416 | /* |
| 417 | * Ensure that the address returned is DMA'ble | 417 | * Ensure that the address returned is DMA'ble |
| 418 | */ | 418 | */ |
| 419 | if (!dma_capable(dev, dev_addr, size)) { | 419 | if (dma_capable(dev, dev_addr, size)) |
| 420 | swiotlb_tbl_unmap_single(dev, map, size, dir); | 420 | return dev_addr; |
| 421 | dev_addr = 0; | 421 | |
| 422 | } | 422 | swiotlb_tbl_unmap_single(dev, map, size, dir); |
| 423 | return dev_addr; | 423 | |
| 424 | return DMA_ERROR_CODE; | ||
| 424 | } | 425 | } |
| 425 | EXPORT_SYMBOL_GPL(xen_swiotlb_map_page); | 426 | EXPORT_SYMBOL_GPL(xen_swiotlb_map_page); |
| 426 | 427 | ||
| @@ -648,13 +649,6 @@ xen_swiotlb_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg, | |||
| 648 | } | 649 | } |
| 649 | EXPORT_SYMBOL_GPL(xen_swiotlb_sync_sg_for_device); | 650 | EXPORT_SYMBOL_GPL(xen_swiotlb_sync_sg_for_device); |
| 650 | 651 | ||
| 651 | int | ||
| 652 | xen_swiotlb_dma_mapping_error(struct device *hwdev, dma_addr_t dma_addr) | ||
| 653 | { | ||
| 654 | return !dma_addr; | ||
| 655 | } | ||
| 656 | EXPORT_SYMBOL_GPL(xen_swiotlb_dma_mapping_error); | ||
| 657 | |||
| 658 | /* | 652 | /* |
| 659 | * Return whether the given device DMA address mask can be supported | 653 | * Return whether the given device DMA address mask can be supported |
| 660 | * properly. For example, if your device can only drive the low 24-bits | 654 | * properly. For example, if your device can only drive the low 24-bits |
