diff options
author | Jean Delvare <jdelvare@suse.de> | 2018-05-12 11:57:37 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-05-16 10:12:35 +0200 |
commit | 62e16d89b4cf9b64436c33c6383df321eca91bec (patch) | |
tree | 06c0ac047f6e9a27b28bbc2cd58d1b1f43921558 | |
parent | 940f0fab9d9e3417acc1d035d79bd5b8b4c15454 (diff) |
swiotlb: silent unwanted warning "buffer is full"
commit 05e13bb57e6f181d7605f8608181c7e6fb7f591d upstream.
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=104082
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Fixes: 0176adb00406 ("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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | lib/swiotlb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/swiotlb.c b/lib/swiotlb.c index 0331de0e9144..dc81f16b9095 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c @@ -727,7 +727,7 @@ swiotlb_alloc_buffer(struct device *dev, size_t size, dma_addr_t *dma_handle, phys_addr = swiotlb_tbl_map_single(dev, swiotlb_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) goto out_warn; |