summaryrefslogtreecommitdiffstats
path: root/lib/swiotlb.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/swiotlb.c')
-rw-r--r--lib/swiotlb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index fece57566d45..cc640588f145 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -714,7 +714,7 @@ swiotlb_alloc_buffer(struct device *dev, size_t size, dma_addr_t *dma_handle,
714 714
715 phys_addr = swiotlb_tbl_map_single(dev, 715 phys_addr = swiotlb_tbl_map_single(dev,
716 __phys_to_dma(dev, io_tlb_start), 716 __phys_to_dma(dev, io_tlb_start),
717 0, size, DMA_FROM_DEVICE, 0); 717 0, size, DMA_FROM_DEVICE, attrs);
718 if (phys_addr == SWIOTLB_MAP_ERROR) 718 if (phys_addr == SWIOTLB_MAP_ERROR)
719 goto out_warn; 719 goto out_warn;
720 720
@@ -737,7 +737,7 @@ out_unmap:
737 swiotlb_tbl_unmap_single(dev, phys_addr, size, DMA_TO_DEVICE, 737 swiotlb_tbl_unmap_single(dev, phys_addr, size, DMA_TO_DEVICE,
738 DMA_ATTR_SKIP_CPU_SYNC); 738 DMA_ATTR_SKIP_CPU_SYNC);
739out_warn: 739out_warn:
740 if ((attrs & DMA_ATTR_NO_WARN) && printk_ratelimit()) { 740 if (!(attrs & DMA_ATTR_NO_WARN) && printk_ratelimit()) {
741 dev_warn(dev, 741 dev_warn(dev,
742 "swiotlb: coherent allocation failed, size=%zu\n", 742 "swiotlb: coherent allocation failed, size=%zu\n",
743 size); 743 size);