]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 30 Mar 2019 20:35:29 +0000 (21:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 30 Mar 2019 20:35:29 +0000 (21:35 +0100)
added patches:
usb-cdc-acm-fix-race-during-wakeup-blocking-tx-traffic.patch
usb-host-xhci-rcar-add-xhci_trust_tx_length-quirk.patch
xhci-fix-port-resume-done-detection-for-ss-ports-with-lpm-enabled.patch

queue-4.14/series
queue-4.14/usb-cdc-acm-fix-race-during-wakeup-blocking-tx-traffic.patch [new file with mode: 0644]
queue-4.14/usb-host-xhci-rcar-add-xhci_trust_tx_length-quirk.patch [new file with mode: 0644]
queue-4.14/xhci-fix-port-resume-done-detection-for-ss-ports-with-lpm-enabled.patch [new file with mode: 0644]

index 7dd9fba6bfe12c7c26793b70892c673280882271..ebf5dc249281065965357faceffda640f3c93676 100644 (file)
@@ -94,3 +94,6 @@ phy-sun4i-usb-support-set_mode-to-usb_host-for-non-otg-phys.patch
 usb-mtu3-fix-extcon-dependency.patch
 usb-gadget-f_hid-fix-deadlock-in-f_hidg_write.patch
 usb-common-consider-only-available-nodes-for-dr_mode.patch
+usb-host-xhci-rcar-add-xhci_trust_tx_length-quirk.patch
+xhci-fix-port-resume-done-detection-for-ss-ports-with-lpm-enabled.patch
+usb-cdc-acm-fix-race-during-wakeup-blocking-tx-traffic.patch
diff --git a/queue-4.14/usb-cdc-acm-fix-race-during-wakeup-blocking-tx-traffic.patch b/queue-4.14/usb-cdc-acm-fix-race-during-wakeup-blocking-tx-traffic.patch
new file mode 100644 (file)
index 0000000..cee3a87
--- /dev/null
@@ -0,0 +1,46 @@
+From 93e1c8a638308980309e009cc40b5a57ef87caf1 Mon Sep 17 00:00:00 2001
+From: Romain Izard <romain.izard.pro@gmail.com>
+Date: Fri, 22 Mar 2019 16:53:02 +0100
+Subject: usb: cdc-acm: fix race during wakeup blocking TX traffic
+
+From: Romain Izard <romain.izard.pro@gmail.com>
+
+commit 93e1c8a638308980309e009cc40b5a57ef87caf1 upstream.
+
+When the kernel is compiled with preemption enabled, the URB completion
+handler can run in parallel with the work responsible for waking up the
+tty layer. If the URB handler sets the EVENT_TTY_WAKEUP bit during the
+call to tty_port_tty_wakeup() to signal that there is room for additional
+input, it will be cleared at the end of this call. As a result, TX traffic
+on the upper layer will be blocked.
+
+This can be seen with a kernel configured with CONFIG_PREEMPT, and a fast
+modem connected with PPP running over a USB CDC-ACM port.
+
+Use test_and_clear_bit() instead, which ensures that each wakeup requested
+by the URB completion code will trigger a call to tty_port_tty_wakeup().
+
+Fixes: 1aba579f3cf5 cdc-acm: handle read pipe errors
+Signed-off-by: Romain Izard <romain.izard.pro@gmail.com>
+Cc: stable <stable@vger.kernel.org>
+Acked-by: Oliver Neukum <oneukum@suse.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/class/cdc-acm.c |    4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+--- a/drivers/usb/class/cdc-acm.c
++++ b/drivers/usb/class/cdc-acm.c
+@@ -570,10 +570,8 @@ static void acm_softint(struct work_stru
+               clear_bit(EVENT_RX_STALL, &acm->flags);
+       }
+-      if (test_bit(EVENT_TTY_WAKEUP, &acm->flags)) {
++      if (test_and_clear_bit(EVENT_TTY_WAKEUP, &acm->flags))
+               tty_port_tty_wakeup(&acm->port);
+-              clear_bit(EVENT_TTY_WAKEUP, &acm->flags);
+-      }
+ }
+ /*
diff --git a/queue-4.14/usb-host-xhci-rcar-add-xhci_trust_tx_length-quirk.patch b/queue-4.14/usb-host-xhci-rcar-add-xhci_trust_tx_length-quirk.patch
new file mode 100644 (file)
index 0000000..bca5c93
--- /dev/null
@@ -0,0 +1,38 @@
+From 40fc165304f0faaae78b761f8ee30b5d216b1850 Mon Sep 17 00:00:00 2001
+From: Yasushi Asano <yasano@jp.adit-jv.com>
+Date: Mon, 18 Feb 2019 11:26:34 +0100
+Subject: usb: host: xhci-rcar: Add XHCI_TRUST_TX_LENGTH quirk
+
+From: Yasushi Asano <yasano@jp.adit-jv.com>
+
+commit 40fc165304f0faaae78b761f8ee30b5d216b1850 upstream.
+
+When plugging BUFFALO LUA4-U3-AGT USB3.0 to Gigabit Ethernet LAN
+Adapter, warning messages filled up dmesg.
+
+[  101.098287] xhci-hcd ee000000.usb: WARN Successful completion on short TX for slot 1 ep 4: needs XHCI_TRUST_TX_LENGTH quirk?
+[  101.117463] xhci-hcd ee000000.usb: WARN Successful completion on short TX for slot 1 ep 4: needs XHCI_TRUST_TX_LENGTH quirk?
+[  101.136513] xhci-hcd ee000000.usb: WARN Successful completion on short TX for slot 1 ep 4: needs XHCI_TRUST_TX_LENGTH quirk?
+
+Adding the XHCI_TRUST_TX_LENGTH quirk resolves the issue.
+
+Signed-off-by: Yasushi Asano <yasano@jp.adit-jv.com>
+Signed-off-by: Spyridon Papageorgiou <spapageorgiou@de.adit-jv.com>
+Acked-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
+Cc: stable <stable@vger.kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/xhci-rcar.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/usb/host/xhci-rcar.c
++++ b/drivers/usb/host/xhci-rcar.c
+@@ -236,6 +236,7 @@ int xhci_rcar_init_quirk(struct usb_hcd
+                       xhci_rcar_is_gen3(hcd->self.controller))
+               xhci->quirks |= XHCI_NO_64BIT_SUPPORT;
++      xhci->quirks |= XHCI_TRUST_TX_LENGTH;
+       return xhci_rcar_download_firmware(hcd);
+ }
diff --git a/queue-4.14/xhci-fix-port-resume-done-detection-for-ss-ports-with-lpm-enabled.patch b/queue-4.14/xhci-fix-port-resume-done-detection-for-ss-ports-with-lpm-enabled.patch
new file mode 100644 (file)
index 0000000..1066509
--- /dev/null
@@ -0,0 +1,47 @@
+From 6cbcf596934c8e16d6288c7cc62dfb7ad8eadf15 Mon Sep 17 00:00:00 2001
+From: Mathias Nyman <mathias.nyman@linux.intel.com>
+Date: Fri, 22 Mar 2019 17:50:15 +0200
+Subject: xhci: Fix port resume done detection for SS ports with LPM enabled
+
+From: Mathias Nyman <mathias.nyman@linux.intel.com>
+
+commit 6cbcf596934c8e16d6288c7cc62dfb7ad8eadf15 upstream.
+
+A suspended SS port in U3 link state will go to U0 when resumed, but
+can almost immediately after that enter U1 or U2 link power save
+states before host controller driver reads the port status.
+
+Host controller driver only checks for U0 state, and might miss
+the finished resume, leaving flags unclear and skip notifying usb
+code of the wake.
+
+Add U1 and U2 to the possible link states when checking for finished
+port resume.
+
+Cc: stable <stable@vger.kernel.org>
+Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/xhci-ring.c |    9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+--- a/drivers/usb/host/xhci-ring.c
++++ b/drivers/usb/host/xhci-ring.c
+@@ -1715,10 +1715,13 @@ static void handle_port_status(struct xh
+               }
+       }
+-      if ((portsc & PORT_PLC) && (portsc & PORT_PLS_MASK) == XDEV_U0 &&
+-                      DEV_SUPERSPEED_ANY(portsc)) {
++      if ((portsc & PORT_PLC) &&
++          DEV_SUPERSPEED_ANY(portsc) &&
++          ((portsc & PORT_PLS_MASK) == XDEV_U0 ||
++           (portsc & PORT_PLS_MASK) == XDEV_U1 ||
++           (portsc & PORT_PLS_MASK) == XDEV_U2)) {
+               xhci_dbg(xhci, "resume SS port %d finished\n", port_id);
+-              /* We've just brought the device into U0 through either the
++              /* We've just brought the device into U0/1/2 through either the
+                * Resume state after a device remote wakeup, or through the
+                * U3Exit state after a host-initiated resume.  If it's a device
+                * initiated remote wake, don't pass up the link state change,