dde_linux: prevent scatter-gather in USB devio

USB devio splits large transaction into 16 KiB buffers in scatter-gather
lists. Unfortunately, this mechanism seems unreliable most certainly because
of issue #4809 "DDE Linux struct page object aliasing".

Issue #5036
This commit is contained in:
Christian Helmuth 2023-07-11 08:16:18 +02:00
parent 65b619e7b4
commit c05d4e5b49
3 changed files with 17 additions and 1 deletions

View File

@ -0,0 +1,15 @@
USB devio splits large transaction into 16 KiB buffers in scatter-gather
lists. Unfortunately, this mechanism seems unreliable most certainly because
of issue #4809 "DDE Linux struct page object aliasing".
--- src/linux/drivers/usb/core/devio.c
+++ src/linux/drivers/usb/core/devio.c
@@ -53,7 +53,7 @@
#define USB_MAXBUS 64
#define USB_DEVICE_MAX (USB_MAXBUS * 128)
-#define USB_SG_SIZE 16384 /* split-size for large txs */
+#define USB_SG_SIZE (1024 * 1024) /* split-size for large txs */
/* Mutual exclusion for ps->list in resume vs. release and remove */
static DEFINE_MUTEX(usbfs_mutex);

View File

@ -1 +1 @@
e6eaabb8e0a8e3f3357229f65ec69ad213019034
5593e6833c49b2b82314c2ad2d040ff91df63d16

View File

@ -12,6 +12,7 @@ DIR(linux) := src/linux
PATCH_FILES := i915_irq.patch \
iwlwifi_enable_irq_before_pnvm.patch \
iwlwifi_limit_rx_bufs.patch \
usb_host_devio_sg.patch \
usb_net_pinephone.patch \
usb_net_cdc_ncm.patch \
workqueue_deadlock.patch