From: Greg Kroah-Hartman Date: Fri, 12 Nov 2021 16:23:23 +0000 (+0100) Subject: 4.4-stable patches X-Git-Tag: v5.4.160~179 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1085aa7a543ca1e3af10ff1c1bec25b80c982dca;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: xhci-fix-usb-3.1-enumeration-issues-by-increasing-roothub-power-on-good-delay.patch --- diff --git a/queue-4.4/series b/queue-4.4/series index c3082c8d530..65f8a98b5ea 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -1,2 +1,3 @@ binder-use-euid-from-cred-instead-of-using-task.patch binder-use-cred-instead-of-task-for-selinux-checks.patch +xhci-fix-usb-3.1-enumeration-issues-by-increasing-roothub-power-on-good-delay.patch diff --git a/queue-4.4/xhci-fix-usb-3.1-enumeration-issues-by-increasing-roothub-power-on-good-delay.patch b/queue-4.4/xhci-fix-usb-3.1-enumeration-issues-by-increasing-roothub-power-on-good-delay.patch new file mode 100644 index 00000000000..689a44707dc --- /dev/null +++ b/queue-4.4/xhci-fix-usb-3.1-enumeration-issues-by-increasing-roothub-power-on-good-delay.patch @@ -0,0 +1,58 @@ +From e1959faf085b004e6c3afaaaa743381f00e7c015 Mon Sep 17 00:00:00 2001 +From: Mathias Nyman +Date: Fri, 5 Nov 2021 18:00:36 +0200 +Subject: xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay + +From: Mathias Nyman + +commit e1959faf085b004e6c3afaaaa743381f00e7c015 upstream. + +Some USB 3.1 enumeration issues were reported after the hub driver removed +the minimum 100ms limit for the power-on-good delay. + +Since commit 90d28fb53d4a ("usb: core: reduce power-on-good delay time of +root hub") the hub driver sets the power-on-delay based on the +bPwrOn2PwrGood value in the hub descriptor. + +xhci driver has a 20ms bPwrOn2PwrGood value for both roothubs based +on xhci spec section 5.4.8, but it's clearly not enough for the +USB 3.1 devices, causing enumeration issues. + +Tests indicate full 100ms delay is needed. + +Reported-by: Walt Jr. Brake +Signed-off-by: Mathias Nyman +Fixes: 90d28fb53d4a ("usb: core: reduce power-on-good delay time of root hub") +Cc: stable +Link: https://lore.kernel.org/r/20211105160036.549516-1-mathias.nyman@linux.intel.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/host/xhci-hub.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/usb/host/xhci-hub.c ++++ b/drivers/usb/host/xhci-hub.c +@@ -156,7 +156,6 @@ static void xhci_common_hub_descriptor(s + { + u16 temp; + +- desc->bPwrOn2PwrGood = 10; /* xhci section 5.4.9 says 20ms max */ + desc->bHubContrCurrent = 0; + + desc->bNbrPorts = ports; +@@ -190,6 +189,7 @@ static void xhci_usb2_hub_descriptor(str + desc->bDescriptorType = USB_DT_HUB; + temp = 1 + (ports / 8); + desc->bDescLength = USB_DT_HUB_NONVAR_SIZE + 2 * temp; ++ desc->bPwrOn2PwrGood = 10; /* xhci section 5.4.8 says 20ms */ + + /* The Device Removable bits are reported on a byte granularity. + * If the port doesn't exist within that byte, the bit is set to 0. +@@ -240,6 +240,7 @@ static void xhci_usb3_hub_descriptor(str + xhci_common_hub_descriptor(xhci, desc, ports); + desc->bDescriptorType = USB_DT_SS_HUB; + desc->bDescLength = USB_DT_SS_HUB_SIZE; ++ desc->bPwrOn2PwrGood = 50; /* usb 3.1 may fail if less than 100ms */ + + /* header decode latency should be zero for roothubs, + * see section 4.23.5.2.