]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Jul 2025 09:10:09 +0000 (11:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Jul 2025 09:10:09 +0000 (11:10 +0200)
added patches:
xhci-dbc-flush-queued-requests-before-stopping-dbc.patch
xhci-dbctty-disable-echo-flag-by-default.patch

queue-5.10/series
queue-5.10/xhci-dbc-flush-queued-requests-before-stopping-dbc.patch [new file with mode: 0644]
queue-5.10/xhci-dbctty-disable-echo-flag-by-default.patch [new file with mode: 0644]

index 200247360e928cbef10b7d2010cc7c642e45287d..03e194737a7680b2477d34265907896bbf082d82 100644 (file)
@@ -133,3 +133,5 @@ dpaa2-eth-update-dpni_get_single_step_cfg-command.patch
 dpaa2-eth-update-single_step-register-access.patch
 net-dpaa2-eth-rearrange-variable-in-dpaa2_eth_get_et.patch
 dpaa2-eth-fix-xdp_rxq_info-leak.patch
+xhci-dbctty-disable-echo-flag-by-default.patch
+xhci-dbc-flush-queued-requests-before-stopping-dbc.patch
diff --git a/queue-5.10/xhci-dbc-flush-queued-requests-before-stopping-dbc.patch b/queue-5.10/xhci-dbc-flush-queued-requests-before-stopping-dbc.patch
new file mode 100644 (file)
index 0000000..5c0a6a7
--- /dev/null
@@ -0,0 +1,37 @@
+From efe3e3ae5a66cb38ef29c909e951b4039044bae9 Mon Sep 17 00:00:00 2001
+From: Mathias Nyman <mathias.nyman@linux.intel.com>
+Date: Fri, 27 Jun 2025 17:41:22 +0300
+Subject: xhci: dbc: Flush queued requests before stopping dbc
+
+From: Mathias Nyman <mathias.nyman@linux.intel.com>
+
+commit efe3e3ae5a66cb38ef29c909e951b4039044bae9 upstream.
+
+Flush dbc requests when dbc is stopped and transfer rings are freed.
+Failure to flush them lead to leaking memory and dbc completing odd
+requests after resuming from suspend, leading to error messages such as:
+
+[   95.344392] xhci_hcd 0000:00:0d.0: no matched request
+
+Cc: stable <stable@kernel.org>
+Fixes: dfba2174dc42 ("usb: xhci: Add DbC support in xHCI driver")
+Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
+Link: https://lore.kernel.org/r/20250627144127.3889714-5-mathias.nyman@linux.intel.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/host/xhci-dbgcap.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/usb/host/xhci-dbgcap.c
++++ b/drivers/usb/host/xhci-dbgcap.c
+@@ -639,6 +639,10 @@ static void xhci_dbc_stop(struct xhci_db
+       case DS_DISABLED:
+               return;
+       case DS_CONFIGURED:
++              spin_lock(&dbc->lock);
++              xhci_dbc_flush_requests(dbc);
++              spin_unlock(&dbc->lock);
++
+               if (dbc->driver->disconnect)
+                       dbc->driver->disconnect(dbc);
+               break;
diff --git a/queue-5.10/xhci-dbctty-disable-echo-flag-by-default.patch b/queue-5.10/xhci-dbctty-disable-echo-flag-by-default.patch
new file mode 100644 (file)
index 0000000..e9505b2
--- /dev/null
@@ -0,0 +1,39 @@
+From 2b857d69a5e116150639a0c6c39c86cc329939ee Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C5=81ukasz=20Bartosik?= <ukaszb@chromium.org>
+Date: Fri, 27 Jun 2025 17:41:21 +0300
+Subject: xhci: dbctty: disable ECHO flag by default
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Łukasz Bartosik <ukaszb@chromium.org>
+
+commit 2b857d69a5e116150639a0c6c39c86cc329939ee upstream.
+
+When /dev/ttyDBC0 device is created then by default ECHO flag
+is set for the terminal device. However if data arrives from
+a peer before application using /dev/ttyDBC0 applies its set
+of terminal flags then the arriving data will be echoed which
+might not be desired behavior.
+
+Fixes: 4521f1613940 ("xhci: dbctty: split dbc tty driver registration and unregistration functions.")
+Cc: stable <stable@kernel.org>
+Signed-off-by: Łukasz Bartosik <ukaszb@chromium.org>
+Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
+Link: https://lore.kernel.org/stable/20250610111802.18742-1-ukaszb%40chromium.org
+Link: https://lore.kernel.org/r/20250627144127.3889714-4-mathias.nyman@linux.intel.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/host/xhci-dbgtty.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/usb/host/xhci-dbgtty.c
++++ b/drivers/usb/host/xhci-dbgtty.c
+@@ -529,6 +529,7 @@ static int dbc_tty_init(void)
+       dbc_tty_driver->type = TTY_DRIVER_TYPE_SERIAL;
+       dbc_tty_driver->subtype = SERIAL_TYPE_NORMAL;
+       dbc_tty_driver->init_termios = tty_std_termios;
++      dbc_tty_driver->init_termios.c_lflag &= ~ECHO;
+       dbc_tty_driver->init_termios.c_cflag =
+                       B9600 | CS8 | CREAD | HUPCL | CLOCAL;
+       dbc_tty_driver->init_termios.c_ispeed = 9600;