+++ /dev/null
-From a5008b59cd9d8de12ab623cb5052bb4735330e5c Mon Sep 17 00:00:00 2001
-From: Christoph Hellwig <hch@lst.de>
-Date: Tue, 16 Jul 2019 22:00:54 +0200
-Subject: dma-direct: only limit the mapping size if swiotlb could be used
-
-From: Christoph Hellwig <hch@lst.de>
-
-commit a5008b59cd9d8de12ab623cb5052bb4735330e5c upstream.
-
-Don't just check for a swiotlb buffer, but also if buffering might
-be required for this particular device.
-
-Fixes: 133d624b1cee ("dma: Introduce dma_max_mapping_size()")
-Reported-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-Signed-off-by: Christoph Hellwig <hch@lst.de>
-Tested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- kernel/dma/direct.c | 10 ++++------
- 1 file changed, 4 insertions(+), 6 deletions(-)
-
---- a/kernel/dma/direct.c
-+++ b/kernel/dma/direct.c
-@@ -393,11 +393,9 @@ int dma_direct_supported(struct device *
-
- size_t dma_direct_max_mapping_size(struct device *dev)
- {
-- size_t size = SIZE_MAX;
--
- /* If SWIOTLB is active, use its maximum mapping size */
-- if (is_swiotlb_active())
-- size = swiotlb_max_mapping_size(dev);
--
-- return size;
-+ if (is_swiotlb_active() &&
-+ (dma_addressing_limited(dev) || swiotlb_force == SWIOTLB_FORCE))
-+ return swiotlb_max_mapping_size(dev);
-+ return SIZE_MAX;
- }
sunrpc-handle-connection-breakages-correctly-in-call_status.patch
media-stm32-dcmi-fix-irq-0-case.patch
nfs-disable-client-side-deduplication.patch
-dma-direct-only-limit-the-mapping-size-if-swiotlb-could-be-used.patch
powerpc-mm-radix-use-the-right-page-size-for-vmemmap-mapping.patch
scripts-decode_stacktrace-match-basepath-using-shell-prefix-operator-not-regex.patch
net-hns-fix-led-configuration-for-marvell-phy.patch