From: Greg Kroah-Hartman Date: Sun, 28 Jun 2020 15:57:25 +0000 (+0200) Subject: 4.14-stable patches X-Git-Tag: v5.7.7~47 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e06bdc5a42362e26038e93c79281a7c8320fdbce;p=thirdparty%2Fkernel%2Fstable-queue.git 4.14-stable patches added patches: cdc-acm-add-disable_echo-quirk-for-microchip-smsc-chip.patch xhci-fix-enumeration-issue-when-setting-max-packet-size-for-fs-devices.patch xhci-fix-incorrect-ep_state_mask.patch --- diff --git a/queue-4.14/cdc-acm-add-disable_echo-quirk-for-microchip-smsc-chip.patch b/queue-4.14/cdc-acm-add-disable_echo-quirk-for-microchip-smsc-chip.patch new file mode 100644 index 00000000000..1e1c1e32dbc --- /dev/null +++ b/queue-4.14/cdc-acm-add-disable_echo-quirk-for-microchip-smsc-chip.patch @@ -0,0 +1,34 @@ +From 03894573f2913181ee5aae0089f333b2131f2d4b Mon Sep 17 00:00:00 2001 +From: Joakim Tjernlund +Date: Fri, 5 Jun 2020 12:54:18 +0200 +Subject: cdc-acm: Add DISABLE_ECHO quirk for Microchip/SMSC chip + +From: Joakim Tjernlund + +commit 03894573f2913181ee5aae0089f333b2131f2d4b upstream. + +USB_DEVICE(0x0424, 0x274e) can send data before cdc_acm is ready, +causing garbage chars on the TTY causing stray input to the shell +and/or login prompt. + +Signed-off-by: Joakim Tjernlund +Cc: stable@vger.kernel.org +Acked-by: Oliver Neukum +Link: https://lore.kernel.org/r/20200605105418.22263-1-joakim.tjernlund@infinera.com +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/class/cdc-acm.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/usb/class/cdc-acm.c ++++ b/drivers/usb/class/cdc-acm.c +@@ -1734,6 +1734,8 @@ static int acm_pre_reset(struct usb_inte + + static const struct usb_device_id acm_ids[] = { + /* quirky and broken devices */ ++ { USB_DEVICE(0x0424, 0x274e), /* Microchip Technology, Inc. (formerly SMSC) */ ++ .driver_info = DISABLE_ECHO, }, /* DISABLE ECHO in termios flag */ + { USB_DEVICE(0x076d, 0x0006), /* Denso Cradle CU-321 */ + .driver_info = NO_UNION_NORMAL, },/* has no union descriptor */ + { USB_DEVICE(0x17ef, 0x7000), /* Lenovo USB modem */ diff --git a/queue-4.14/series b/queue-4.14/series index b4747410e80..7ee20e9640e 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -27,3 +27,6 @@ usb-ehci-reopen-solution-for-synopsys-hc-bug.patch usb-host-xhci-mtk-avoid-runtime-suspend-when-removing-hcd.patch usb-host-ehci-exynos-fix-error-check-in-exynos_ehci_probe.patch alsa-usb-audio-add-quirk-for-denon-dcd-1500re.patch +xhci-fix-incorrect-ep_state_mask.patch +xhci-fix-enumeration-issue-when-setting-max-packet-size-for-fs-devices.patch +cdc-acm-add-disable_echo-quirk-for-microchip-smsc-chip.patch diff --git a/queue-4.14/xhci-fix-enumeration-issue-when-setting-max-packet-size-for-fs-devices.patch b/queue-4.14/xhci-fix-enumeration-issue-when-setting-max-packet-size-for-fs-devices.patch new file mode 100644 index 00000000000..159860580a4 --- /dev/null +++ b/queue-4.14/xhci-fix-enumeration-issue-when-setting-max-packet-size-for-fs-devices.patch @@ -0,0 +1,44 @@ +From a73d9d9cfc3cfceabd91fb0b0c13e4062b6dbcd7 Mon Sep 17 00:00:00 2001 +From: Al Cooper +Date: Wed, 24 Jun 2020 16:59:46 +0300 +Subject: xhci: Fix enumeration issue when setting max packet size for FS devices. + +From: Al Cooper + +commit a73d9d9cfc3cfceabd91fb0b0c13e4062b6dbcd7 upstream. + +Unable to complete the enumeration of a USB TV Tuner device. + +Per XHCI spec (4.6.5), the EP state field of the input context shall +be cleared for a set address command. In the special case of an FS +device that has "MaxPacketSize0 = 8", the Linux XHCI driver does +not do this before evaluating the context. With an XHCI controller +that checks the EP state field for parameter context error this +causes a problem in cases such as the device getting reset again +after enumeration. + +When that field is cleared, the problem does not occur. + +This was found and fixed by Sasi Kumar. + +Cc: stable@vger.kernel.org +Signed-off-by: Al Cooper +Signed-off-by: Mathias Nyman +Link: https://lore.kernel.org/r/20200624135949.22611-3-mathias.nyman@linux.intel.com +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/xhci.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/usb/host/xhci.c ++++ b/drivers/usb/host/xhci.c +@@ -1346,6 +1346,7 @@ static int xhci_check_maxpacket(struct x + xhci->devs[slot_id]->out_ctx, ep_index); + + ep_ctx = xhci_get_ep_ctx(xhci, command->in_ctx, ep_index); ++ ep_ctx->ep_info &= cpu_to_le32(~EP_STATE_MASK);/* must clear */ + ep_ctx->ep_info2 &= cpu_to_le32(~MAX_PACKET_MASK); + ep_ctx->ep_info2 |= cpu_to_le32(MAX_PACKET(max_packet_size)); + diff --git a/queue-4.14/xhci-fix-incorrect-ep_state_mask.patch b/queue-4.14/xhci-fix-incorrect-ep_state_mask.patch new file mode 100644 index 00000000000..b60e67462d6 --- /dev/null +++ b/queue-4.14/xhci-fix-incorrect-ep_state_mask.patch @@ -0,0 +1,37 @@ +From dceea67058fe22075db3aed62d5cb62092be5053 Mon Sep 17 00:00:00 2001 +From: Mathias Nyman +Date: Wed, 24 Jun 2020 16:59:45 +0300 +Subject: xhci: Fix incorrect EP_STATE_MASK + +From: Mathias Nyman + +commit dceea67058fe22075db3aed62d5cb62092be5053 upstream. + +EP_STATE_MASK should be 0x7 instead of 0xf + +xhci spec 6.2.3 shows that the EP state field in the endpoint context data +structure consist of bits [2:0]. +The old value included a bit from the next field which fortunately is a + RsvdZ region. So hopefully this hasn't caused too much harm + +Cc: stable@vger.kernel.org +Signed-off-by: Mathias Nyman +Link: https://lore.kernel.org/r/20200624135949.22611-2-mathias.nyman@linux.intel.com +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/xhci.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/host/xhci.h ++++ b/drivers/usb/host/xhci.h +@@ -718,7 +718,7 @@ struct xhci_ep_ctx { + * 4 - TRB error + * 5-7 - reserved + */ +-#define EP_STATE_MASK (0xf) ++#define EP_STATE_MASK (0x7) + #define EP_STATE_DISABLED 0 + #define EP_STATE_RUNNING 1 + #define EP_STATE_HALTED 2