swiotlb: silent unwanted warning "buffer is full"

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Mon May 14 05:59:03 PDT 2018


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=05e13bb57e6f181d7605f8608181c7e6fb7f591d
Commit:     05e13bb57e6f181d7605f8608181c7e6fb7f591d
Parent:     75bc37fefc4471e718ba8e651aa74673d4e0a9eb
Author:     Jean Delvare <jdelvare at suse.de>
AuthorDate: Sat May 12 11:57:37 2018 +0200
Committer:  Christoph Hellwig <hch at lst.de>
CommitDate: Sat May 12 11:57:37 2018 +0200

    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=104082
    
    Signed-off-by: Jean Delvare <jdelvare at suse.de>
    Fixes: 0176adb00406 ("swiotlb: refactor coherent buffer allocation")
    Cc: Christoph Hellwig <hch at lst.de>
    Cc: Christian König <christian.koenig at amd.com>
    Cc: Michel Dänzer <michel at daenzer.net>
    Cc: Takashi Iwai <tiwai at suse.de>
    Cc: stable at vger.kernel.org # v4.16
---
 lib/swiotlb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index 12fbaa445637..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,
 
 	phys_addr = swiotlb_tbl_map_single(dev,
 			__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;
 



More information about the linux-mtd-cvs mailing list