From 185cc50c0032c122d0c0ed1bc2ac60ba409f25db Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sun, 28 Jun 2020 17:55:16 +0200 Subject: [PATCH] 4.4-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 --- ...e_echo-quirk-for-microchip-smsc-chip.patch | 34 ++++++++++++++ queue-4.4/series | 3 ++ ...tting-max-packet-size-for-fs-devices.patch | 44 +++++++++++++++++++ .../xhci-fix-incorrect-ep_state_mask.patch | 37 ++++++++++++++++ 4 files changed, 118 insertions(+) create mode 100644 queue-4.4/cdc-acm-add-disable_echo-quirk-for-microchip-smsc-chip.patch create mode 100644 queue-4.4/xhci-fix-enumeration-issue-when-setting-max-packet-size-for-fs-devices.patch create mode 100644 queue-4.4/xhci-fix-incorrect-ep_state_mask.patch diff --git a/queue-4.4/cdc-acm-add-disable_echo-quirk-for-microchip-smsc-chip.patch b/queue-4.4/cdc-acm-add-disable_echo-quirk-for-microchip-smsc-chip.patch new file mode 100644 index 00000000000..db44e90ebf5 --- /dev/null +++ b/queue-4.4/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 +@@ -1684,6 +1684,8 @@ static int acm_reset_resume(struct usb_i + + 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.4/series b/queue-4.4/series index 7b56748c71d..acf64a1bd53 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -98,3 +98,6 @@ pci-disable-msi-for-hisilicon-hip06-hip07-root-ports.patch usb-ehci-reopen-solution-for-synopsys-hc-bug.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.4/xhci-fix-enumeration-issue-when-setting-max-packet-size-for-fs-devices.patch b/queue-4.4/xhci-fix-enumeration-issue-when-setting-max-packet-size-for-fs-devices.patch new file mode 100644 index 00000000000..016dcea65ca --- /dev/null +++ b/queue-4.4/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 +@@ -1340,6 +1340,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.4/xhci-fix-incorrect-ep_state_mask.patch b/queue-4.4/xhci-fix-incorrect-ep_state_mask.patch new file mode 100644 index 00000000000..ec01b9eb120 --- /dev/null +++ b/queue-4.4/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 +@@ -706,7 +706,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 -- 2.47.3