Commit 05e13bb5 authored by Jean Delvare's avatar Jean Delvare Committed by Christoph Hellwig

swiotlb: silent unwanted warning "buffer is full"

If DMA_ATTR_NO_WARN is passed to swiotlb_alloc_buffer(), it should be
passed further down to swiotlb_tbl_map_single(). Otherwise we escape
half of the warnings but still log the other half.

This is one of the multiple causes of spurious warnings reported at:
https://bugs.freedesktop.org/show_bug.cgi?id=104082Signed-off-by: default avatarJean Delvare <jdelvare@suse.de>
Fixes: 0176adb0 ("swiotlb: refactor coherent buffer allocation")
Cc: Christoph Hellwig <hch@lst.de>
Cc: Christian König <christian.koenig@amd.com>
Cc: Michel Dänzer <michel@daenzer.net>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: stable@vger.kernel.org # v4.16
parent 75bc37fe
...@@ -714,7 +714,7 @@ swiotlb_alloc_buffer(struct device *dev, size_t size, dma_addr_t *dma_handle, ...@@ -714,7 +714,7 @@ swiotlb_alloc_buffer(struct device *dev, size_t size, dma_addr_t *dma_handle,
phys_addr = swiotlb_tbl_map_single(dev, phys_addr = swiotlb_tbl_map_single(dev,
__phys_to_dma(dev, io_tlb_start), __phys_to_dma(dev, io_tlb_start),
0, size, DMA_FROM_DEVICE, 0); 0, size, DMA_FROM_DEVICE, attrs);
if (phys_addr == SWIOTLB_MAP_ERROR) if (phys_addr == SWIOTLB_MAP_ERROR)
goto out_warn; goto out_warn;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment