summaryrefslogtreecommitdiffstats
path: root/debian/patches/bugfix/all/usb-dont-create-dma-pools-for-HCD.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:02:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:02:38 +0000
commit08b74a000942a380fe028845f92cd3a0dee827d5 (patch)
treeaa78b4e12607c3e1fcce8d5cc42df4330792f118 /debian/patches/bugfix/all/usb-dont-create-dma-pools-for-HCD.patch
parentAdding upstream version 4.19.249. (diff)
downloadlinux-08b74a000942a380fe028845f92cd3a0dee827d5.tar.xz
linux-08b74a000942a380fe028845f92cd3a0dee827d5.zip
Adding debian version 4.19.249-2.debian/4.19.249-2debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--debian/patches/bugfix/all/usb-dont-create-dma-pools-for-HCD.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/debian/patches/bugfix/all/usb-dont-create-dma-pools-for-HCD.patch b/debian/patches/bugfix/all/usb-dont-create-dma-pools-for-HCD.patch
new file mode 100644
index 000000000..197a4fadb
--- /dev/null
+++ b/debian/patches/bugfix/all/usb-dont-create-dma-pools-for-HCD.patch
@@ -0,0 +1,31 @@
+From: Christoph Hellwig <hch@lst.de>
+Date: Sun, 11 Aug 2019 10:05:15 +0200
+Subject: usb: don't create dma pools for HCDs with a localmem_pool
+Origin: https://git.kernel.org/linus/dd3ecf17ba70a70d2c9ef9ba725281b84f8eef12
+
+If the HCD provides a localmem pool we will never use the DMA pools, so
+don't create them.
+
+Fixes: b0310c2f09bb ("USB: use genalloc for USB HCs with local memory")
+Signed-off-by: Christoph Hellwig <hch@lst.de>
+Link: https://lore.kernel.org/r/20190811080520.21712-2-hch@lst.de
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/core/buffer.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/usb/core/buffer.c
++++ b/drivers/usb/core/buffer.c
+@@ -66,9 +66,9 @@
+ char name[16];
+ int i, size;
+
+- if (!IS_ENABLED(CONFIG_HAS_DMA) ||
+- (!is_device_dma_capable(hcd->self.sysdev) &&
+- !hcd->localmem_pool))
++ if (hcd->localmem_pool ||
++ !IS_ENABLED(CONFIG_HAS_DMA) ||
++ !is_device_dma_capable(hcd->self.sysdev))
+ return 0;
+
+ for (i = 0; i < HCD_BUFFER_POOLS; i++) {