Skip to contentSkip to conversation

usb: core: reduce power-on-good delay time of root hub

PATCH In review Chunfeng Yun 6 participants 18 messages Apr 10, 2021 – Nov 9, 2021 1 message not in the archive

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 usb: core: reduce power-on-good delay time of root hub

Return the exactly delay time given by root hub descriptor, this helps to reduce resume time etc.

Due to the root hub descriptor is usually provided by the host controller driver, if there is compatibility for a root hub, we can fix it easily without affect other root hub

---
v2: remove RFC tag, and add acked-by Alan

---
 drivers/usb/core/hub.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/usb/core/hub.h +4 -2
index 73f4482d833a..22ea1f4f2d66 100644
@@ -148,8 +148,10 @@ static inline unsigned hub_power_on_good_delay(struct usb_hub *hub)
 {
 	unsigned delay = hub->descriptor->bPwrOn2PwrGood * 2;
 
-	/* Wait at least 100 msec for power to become stable */
-	return max(delay, 100U);
+	if (!hub->hdev->parent)	/* root hub */
+		return delay;
+	else /* Wait at least 100 msec for power to become stable */
+		return max(delay, 100U);
 }
 
 static inline int hub_port_debounce_be_connected(struct usb_hub *hub,
Signature · 1 line
2.18.0
#1 lore raw

Three month ago, My USB 3.1 device cannot be detected after upgrade kernel from version 5.10.41 to 5.10.42.

And I found some other people ran into the same issue:

https://forum.manjaro.org/t/kernel-5-10-59-doesnt-detect-a-connected-usb-external-disk/79320

https://forum.manjaro.org/t/how-to-make-active-usb-hub-work-in-manjaro/84548

Two days ago, I try to fix the issue myself, and I found out that it was cause by this patch. After revert this patch, my USB 3.1 device can be detect again.

I have already file a bug on here: https://bugzilla.kernel.org/show_bug.cgi?id=214875.

#2 lore raw
Quoted 10 lines · Walt Jr. Brake

Three month ago, My USB 3.1 device cannot be detected after upgrade kernel from version 5.10.41 to 5.10.42.

And I found some other people ran into the same issue:

https://forum.manjaro.org/t/kernel-5-10-59-doesnt-detect-a-connected-usb-external-disk/79320

https://forum.manjaro.org/t/how-to-make-active-usb-hub-work-in-manjaro/84548

Quoted 6 lines

Two days ago, I try to fix the issue myself, and I found out that it was cause by this patch. After revert this patch, my USB 3.1 device can be detect again.

I have already file a bug on here:
https://bugzilla.kernel.org/show_bug.cgi?id=214875.

#regzbot ^introduced 90d28fb53d4a51299ff324dede015d5cb11b88a2 #regzbot link: https://bugzilla.kernel.org/show_bug.cgi?id=214875

#3 lore raw
Quoted 15 lines · Thorsten Leemhuis
Quoted 14 lines · Walt Jr. Brake

Three month ago, My USB 3.1 device cannot be detected after upgrade kernel from version 5.10.41 to 5.10.42.

And I found some other people ran into the same issue:

https://forum.manjaro.org/t/kernel-5-10-59-doesnt-detect-a-connected-usb-external-disk/79320

https://forum.manjaro.org/t/how-to-make-active-usb-hub-work-in-manjaro/84548

Two days ago, I try to fix the issue myself, and I found out that it was cause by this patch. After revert this patch, my USB 3.1 device can be detect again.

Quoted 6 lines
Quoted 2 lines

I have already file a bug on here:
https://bugzilla.kernel.org/show_bug.cgi?id=214875.

#regzbot ^introduced 90d28fb53d4a51299ff324dede015d5cb11b88a2 #regzbot link: https://bugzilla.kernel.org/show_bug.cgi?id=214875

#regzbot monitor:
https://lore.kernel.org/lkml/[email protected]/
#regzbot ignore-activity

#4 lore raw
In reply to Thorsten Leemhuis
Quoted 15 lines · Thorsten Leemhuis
Quoted 14 lines · Walt Jr. Brake

Three month ago, My USB 3.1 device cannot be detected after upgrade kernel from version 5.10.41 to 5.10.42.

And I found some other people ran into the same issue:

https://forum.manjaro.org/t/kernel-5-10-59-doesnt-detect-a-connected-usb-external-disk/79320

https://forum.manjaro.org/t/how-to-make-active-usb-hub-work-in-manjaro/84548

Two days ago, I try to fix the issue myself, and I found out that it was cause by this patch. After revert this patch, my USB 3.1 device can be detect again.

Quoted 5 lines
Quoted 2 lines

I have already file a bug on here:
https://bugzilla.kernel.org/show_bug.cgi?id=214875.

#regzbot ^introduced 90d28fb53d4a51299ff324dede015d5cb11b88a2 #regzbot link: https://bugzilla.kernel.org/show_bug.cgi?id=214875

#regzbot fixed-by e1959faf085b004e6c3afaaaa743381f00e7c015 #regzbot ignore-activity

BTW, to anyone is reading this and wondering why it's needed: regzbot needed the above, as the fix for this regression(¹) lacked a Link: tag with the URL to the report. It it had been there, regzbot would have automatically noticed the fix when it showed up in next.

Thinking aloud: The fix was posted in the thread with the regression report. Regzbot could be enhanced to detect such cases automatically.

Thinking aloud, too: regzbot could be enhanced to notice if a mail or a commit mentioned a commit-id that is known to cause a tracked regression.

I guess the former might not be worth it, the latter OTOH might be a good idea I will keep in mind.

Ciao, Thorsten

(¹)
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=e1959faf085b004e6c3afaaaa743381f00e7c015

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw
Quoted 13 lines · Walt Jr. Brake

This patch make USB 3.1 device cannot be detected, and I report the bug [1] to archlinux three month ago. Yesterday I try to fix it myself, and after I revert this patch, compile the kernel and test, it works.

[1] https://bugs.archlinux.org/task/71660?project=1&pagenum=2

drivers/usb/core/hub.h +0 -0
index 22ea1f4f2d66..73f4482d833a 100644
@@ -148,10 +148,8 @@ static inline unsigned hub_power_on_good_delay(struct
 usb_hub *hub)

drivers/usb/core/hub.h static inline unsigned hub_power_on_good_delay(struct · line 154

Quoted 10 lines
drivers/usb/core/hub.h +2 -4
  {
         unsigned delay = hub->descriptor->bPwrOn2PwrGood * 2;
 
-       if (!hub->hdev->parent) /* root hub */
-               return delay;
-       else /* Wait at least 100 msec for power to become stable */
-               return max(delay, 100U);
+       /* Wait at least 100 msec for power to become stable */
+       return max(delay, 100U);
  }

Mathias:

It looks like the bPwrOn2PwrGood value in xhci-hcd's hub descriptor is too small for some USB 3.1 devices.

Can you look into this?

Alan Stern

Quoted 31 lines · Chunfeng Yun
drivers/usb/core/hub.h +0 -0
 > Return the exactly delay time given by root hub descriptor,
Quoted 29 lines

this helps to reduce resume time etc.

Due to the root hub descriptor is usually provided by the host controller driver, if there is compatibility for a root hub, we can fix it easily without affect other root hub

---
v2: remove RFC tag, and add acked-by Alan

---
  drivers/usb/core/hub.h | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)
drivers/usb/core/hub.h +4 -2
index 73f4482d833a..22ea1f4f2d66 100644
@@ -148,8 +148,10 @@ static inline unsigned hub_power_on_good_delay(struct usb_hub *hub)
  {
  	unsigned delay = hub->descriptor->bPwrOn2PwrGood * 2;
-	/* Wait at least 100 msec for power to become stable */
-	return max(delay, 100U);
+	if (!hub->hdev->parent)	/* root hub */
+		return delay;
+	else /* Wait at least 100 msec for power to become stable */
+		return max(delay, 100U);
  }
  static inline int hub_port_debounce_be_connected(struct usb_hub *hub,
#7 lore raw
Quoted 27 lines · Alan Stern
Quoted 13 lines · Walt Jr. Brake

This patch make USB 3.1 device cannot be detected, and I report the bug [1] to archlinux three month ago. Yesterday I try to fix it myself, and after I revert this patch, compile the kernel and test, it works.

[1] https://bugs.archlinux.org/task/71660?project=1&pagenum=2

drivers/usb/core/hub.h +0 -0
index 22ea1f4f2d66..73f4482d833a 100644
@@ -148,10 +148,8 @@ static inline unsigned hub_power_on_good_delay(struct
 usb_hub *hub)

drivers/usb/core/hub.h static inline unsigned hub_power_on_good_delay(struct · line 154

Quoted 10 lines
drivers/usb/core/hub.h +2 -4
  {
         unsigned delay = hub->descriptor->bPwrOn2PwrGood * 2;
 
-       if (!hub->hdev->parent) /* root hub */
-               return delay;
-       else /* Wait at least 100 msec for power to become stable */
-               return max(delay, 100U);
+       /* Wait at least 100 msec for power to become stable */
+       return max(delay, 100U);
  }

Mathias:

Quoted 7 lines

It looks like the bPwrOn2PwrGood value in xhci-hcd's hub descriptor is too small for some USB 3.1 devices.

Can you look into this?

Alan Stern

At first glance the xhci roothub bPwrOn2PwrGood value looks ok. xhci spec 5.4.8 states software should wait 20ms after asserting PP, before attempting to change the state of the port.

xhci driver sets desc->bPwrOn2PwrGood = 10; (2ms interval, so equals 20ms )

We should probably get this working immediately, so maybe revert that patch while looking into the rootcause.

Walt Jr. Brake, instead of reverting that patch, could you test if changing the xhci roothub bPwrOn2PwrGood value helps.

drivers/usb/host/xhci-hub.c +1 -1
index a3f875eea751..756231a55602 100644
@@ -257,7 +257,7 @@ static void xhci_common_hub_descriptor(struct xhci_hcd *xhci,
 {
        u16 temp;
 
-       desc->bPwrOn2PwrGood = 10;      /* xhci section 5.4.9 says 20ms max */
+       desc->bPwrOn2PwrGood = 50;      /* The 20ms in xhci 5.4.8 isn't enough for USB 3.1 */
        desc->bHubContrCurrent = 0;
 
        desc->bNbrPorts = ports;

Thanks
-Mathias

_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek

#8 lore raw
Quoted 60 lines · Mathias Nyman
Quoted 26 lines · Alan Stern
Quoted 13 lines · Walt Jr. Brake

This patch make USB 3.1 device cannot be detected, and I report the bug [1] to archlinux three month ago. Yesterday I try to fix it myself, and after I revert this patch, compile the kernel and test, it works.

[1] https://bugs.archlinux.org/task/71660?project=1&pagenum=2

drivers/usb/core/hub.h +0 -0
index 22ea1f4f2d66..73f4482d833a 100644
@@ -148,10 +148,8 @@ static inline unsigned hub_power_on_good_delay(struct
 usb_hub *hub)

drivers/usb/core/hub.h static inline unsigned hub_power_on_good_delay(struct · line 154

Quoted 10 lines
drivers/usb/core/hub.h +2 -4
  {
         unsigned delay = hub->descriptor->bPwrOn2PwrGood * 2;
 
-       if (!hub->hdev->parent) /* root hub */
-               return delay;
-       else /* Wait at least 100 msec for power to become stable */
-               return max(delay, 100U);
+       /* Wait at least 100 msec for power to become stable */
+       return max(delay, 100U);
  }

Mathias:

Quoted 7 lines

It looks like the bPwrOn2PwrGood value in xhci-hcd's hub descriptor is too small for some USB 3.1 devices.

Can you look into this?

Alan Stern

At first glance the xhci roothub bPwrOn2PwrGood value looks ok. xhci spec 5.4.8 states software should wait 20ms after asserting PP, before attempting to change the state of the port.

xhci driver sets desc->bPwrOn2PwrGood = 10; (2ms interval, so equals 20ms )

We should probably get this working immediately, so maybe revert that patch while looking into the rootcause.

Walt Jr. Brake, instead of reverting that patch, could you test if changing the xhci roothub bPwrOn2PwrGood value helps.

drivers/usb/host/xhci-hub.c +1 -1
index a3f875eea751..756231a55602 100644
@@ -257,7 +257,7 @@ static void xhci_common_hub_descriptor(struct xhci_hcd *xhci,
  {
         u16 temp;
 
-       desc->bPwrOn2PwrGood = 10;      /* xhci section 5.4.9 says 20ms max */
+       desc->bPwrOn2PwrGood = 50;      /* The 20ms in xhci 5.4.8 isn't enough for USB 3.1 */
         desc->bHubContrCurrent = 0;
 
         desc->bNbrPorts = ports;
Quoted 2 lines

Thanks
-Mathias

Mathias:

Sorry to reply lately. I test with your patch, it works.

I also test with setting bPwrOn2PwrGood to 45, and it not work.

Seems that the minimal value should be 50 for this case.

#9 lore raw
Quoted 64 lines · Walt Jr. Brake
Quoted 58 lines · Mathias Nyman
Quoted 26 lines · Alan Stern
Quoted 13 lines · Walt Jr. Brake

This patch make USB 3.1 device cannot be detected, and I report the bug [1] to archlinux three month ago. Yesterday I try to fix it myself, and after I revert this patch, compile the kernel and test, it works.

[1] https://bugs.archlinux.org/task/71660?project=1&pagenum=2

drivers/usb/core/hub.h +0 -0
index 22ea1f4f2d66..73f4482d833a 100644
@@ -148,10 +148,8 @@ static inline unsigned hub_power_on_good_delay(struct
 usb_hub *hub)

drivers/usb/core/hub.h static inline unsigned hub_power_on_good_delay(struct · line 154

Quoted 10 lines
drivers/usb/core/hub.h +2 -4
   {
          unsigned delay = hub->descriptor->bPwrOn2PwrGood * 2;
 
-       if (!hub->hdev->parent) /* root hub */
-               return delay;
-       else /* Wait at least 100 msec for power to become stable */
-               return max(delay, 100U);
+       /* Wait at least 100 msec for power to become stable */
+       return max(delay, 100U);
   }

Mathias:

Quoted 7 lines

It looks like the bPwrOn2PwrGood value in xhci-hcd's hub descriptor is too small for some USB 3.1 devices.

Can you look into this?

Alan Stern

At first glance the xhci roothub bPwrOn2PwrGood value looks ok. xhci spec 5.4.8 states software should wait 20ms after asserting PP, before attempting to change the state of the port.

xhci driver sets desc->bPwrOn2PwrGood = 10; (2ms interval, so equals 20ms )

We should probably get this working immediately, so maybe revert that patch while looking into the rootcause.

Walt Jr. Brake, instead of reverting that patch, could you test if changing the xhci roothub bPwrOn2PwrGood value helps.

drivers/usb/host/xhci-hub.c +0 -0
index a3f875eea751..756231a55602 100644
@@ -257,7 +257,7 @@ static void xhci_common_hub_descriptor(struct xhci_hcd *xhci,
   {
          u16 temp;

  -       desc->bPwrOn2PwrGood = 10;      /* xhci section 5.4.9 says 20ms max */ +       desc->bPwrOn2PwrGood = 50;      /* The 20ms in xhci 5.4.8 isn't enough for USB 3.1 */ desc->bHubContrCurrent = 0;
           desc->bNbrPorts = ports;

Quoted 2 lines

Thanks
-Mathias

Mathias:

Quoted 6 lines

Sorry to reply lately. I test with your patch, it works.

I also test with setting bPwrOn2PwrGood to 45, and it not work.

Seems that the minimal value should be 50 for this case.

Thanks for testing, and for checking that 90ms wait isn't enough

-Mathias

#10 lore raw
Quoted 65 lines · Mathias Nyman
Quoted 64 lines · Walt Jr. Brake
Quoted 58 lines · Mathias Nyman
Quoted 26 lines · Alan Stern
Quoted 13 lines · Walt Jr. Brake

This patch make USB 3.1 device cannot be detected, and I report the bug [1] to archlinux three month ago. Yesterday I try to fix it myself, and after I revert this patch, compile the kernel and test, it works.

[1] https://bugs.archlinux.org/task/71660?project=1&pagenum=2

drivers/usb/core/hub.h +0 -0
index 22ea1f4f2d66..73f4482d833a 100644
@@ -148,10 +148,8 @@ static inline unsigned hub_power_on_good_delay(struct
 usb_hub *hub)

drivers/usb/core/hub.h static inline unsigned hub_power_on_good_delay(struct · line 154

Quoted 10 lines
drivers/usb/core/hub.h +2 -4
   {
          unsigned delay = hub->descriptor->bPwrOn2PwrGood * 2;
 
-       if (!hub->hdev->parent) /* root hub */
-               return delay;
-       else /* Wait at least 100 msec for power to become stable */
-               return max(delay, 100U);
+       /* Wait at least 100 msec for power to become stable */
+       return max(delay, 100U);
   }

Mathias:

Quoted 7 lines

It looks like the bPwrOn2PwrGood value in xhci-hcd's hub descriptor is too small for some USB 3.1 devices.

Can you look into this?

Alan Stern

At first glance the xhci roothub bPwrOn2PwrGood value looks ok. xhci spec 5.4.8 states software should wait 20ms after asserting PP, before attempting to change the state of the port.

xhci driver sets desc->bPwrOn2PwrGood = 10; (2ms interval, so equals 20ms )

We should probably get this working immediately, so maybe revert that patch while looking into the rootcause.

Walt Jr. Brake, instead of reverting that patch, could you test if changing the xhci roothub bPwrOn2PwrGood value helps.

drivers/usb/host/xhci-hub.c +0 -0
index a3f875eea751..756231a55602 100644
@@ -257,7 +257,7 @@ static void xhci_common_hub_descriptor(struct xhci_hcd *xhci,
   {
          u16 temp;

  -       desc->bPwrOn2PwrGood = 10;      /* xhci section 5.4.9 says 20ms max */ +       desc->bPwrOn2PwrGood = 50;      /* The 20ms in xhci 5.4.8 isn't enough for USB 3.1 */ desc->bHubContrCurrent = 0;
           desc->bNbrPorts = ports;

Quoted 2 lines

Thanks
-Mathias

Mathias:

Quoted 8 lines
Quoted 6 lines

Sorry to reply lately. I test with your patch, it works.

I also test with setting bPwrOn2PwrGood to 45, and it not work.

Seems that the minimal value should be 50 for this case.

Thanks for testing, and for checking that 90ms wait isn't enough

Can you send a "real" patch for this so I can get it into the tree soon to resolve the regression?

thanks,

greg k-h

#11 lore raw
Quoted 70 lines · Greg Kroah-Hartman
Quoted 69 lines · Mathias Nyman
Quoted 68 lines · Walt Jr. Brake
Quoted 58 lines · Mathias Nyman
Quoted 26 lines · Alan Stern
Quoted 13 lines · Walt Jr. Brake

This patch make USB 3.1 device cannot be detected, and I report the bug [1] to archlinux three month ago. Yesterday I try to fix it myself, and after I revert this patch, compile the kernel and test, it works.

[1] https://bugs.archlinux.org/task/71660?project=1&pagenum=2

drivers/usb/core/hub.h +0 -0
index 22ea1f4f2d66..73f4482d833a 100644
@@ -148,10 +148,8 @@ static inline unsigned hub_power_on_good_delay(struct
 usb_hub *hub)

drivers/usb/core/hub.h static inline unsigned hub_power_on_good_delay(struct · line 154

Quoted 10 lines
drivers/usb/core/hub.h +2 -4
   {
          unsigned delay = hub->descriptor->bPwrOn2PwrGood * 2;
 
-       if (!hub->hdev->parent) /* root hub */
-               return delay;
-       else /* Wait at least 100 msec for power to become stable */
-               return max(delay, 100U);
+       /* Wait at least 100 msec for power to become stable */
+       return max(delay, 100U);
   }

Mathias:

Quoted 7 lines

It looks like the bPwrOn2PwrGood value in xhci-hcd's hub descriptor is too small for some USB 3.1 devices.

Can you look into this?

Alan Stern

At first glance the xhci roothub bPwrOn2PwrGood value looks ok. xhci spec 5.4.8 states software should wait 20ms after asserting PP, before attempting to change the state of the port.

xhci driver sets desc->bPwrOn2PwrGood = 10; (2ms interval, so equals 20ms )

We should probably get this working immediately, so maybe revert that patch while looking into the rootcause.

Walt Jr. Brake, instead of reverting that patch, could you test if changing the xhci roothub bPwrOn2PwrGood value helps.

drivers/usb/host/xhci-hub.c +0 -0
index a3f875eea751..756231a55602 100644
@@ -257,7 +257,7 @@ static void xhci_common_hub_descriptor(struct xhci_hcd *xhci,
   {
          u16 temp;

  -       desc->bPwrOn2PwrGood = 10;      /* xhci section 5.4.9 says 20ms max */ +       desc->bPwrOn2PwrGood = 50;      /* The 20ms in xhci 5.4.8 isn't enough for USB 3.1 */ desc->bHubContrCurrent = 0;
           desc->bNbrPorts = ports;

Quoted 2 lines

Thanks
-Mathias

Mathias:

Sorry to reply lately. I test with your patch, it works.

I also test with setting bPwrOn2PwrGood to 45, and it not work.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

Seems that the minimal value should be 50 for this case.

Thanks for testing, and for checking that 90ms wait isn't enough

Can you send a "real" patch for this so I can get it into the tree soon to resolve the regression?

Also, it might make sense to move the desc->bPwrOn2PwrGood setting from xhci_common_hub_descriptor into the speed-specific routines. For the USB-2 root hub the value can remain set to 10; only the USB-3 root hub needs to be changed.

Alan Stern

#12 lore raw

PATCH 1/1 xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay

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.

---
 drivers/usb/host/xhci-hub.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/usb/host/xhci-hub.c +2 -1
index a3f875eea751..af946c42b6f0 100644
@@ -257,7 +257,6 @@ static void xhci_common_hub_descriptor(struct xhci_hcd *xhci,
 {
 	u16 temp;
 
-	desc->bPwrOn2PwrGood = 10;	/* xhci section 5.4.9 says 20ms max */
 	desc->bHubContrCurrent = 0;
 
 	desc->bNbrPorts = ports;
@@ -292,6 +291,7 @@ static void xhci_usb2_hub_descriptor(struct usb_hcd *hcd, struct xhci_hcd *xhci,
 	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.
@@ -344,6 +344,7 @@ static void xhci_usb3_hub_descriptor(struct usb_hcd *hcd, struct xhci_hcd *xhci,
 	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.
Signature · 1 line
2.25.1
#13 lore raw

Re: [PATCH] xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay

Quoted 7 lines · Mathias Nyman

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.

Quoted 9 lines

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.

Walt Jr Brake, just to be sure could you test this one as well?

As Alan suggested this sets 100ms for the USB 3 roothub but keeps the 20ms for the USB 2 roothub.

Thanks
-Mathias

#14 lore raw

Re: [PATCH] xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay

Quoted 17 lines · Mathias Nyman
Quoted 7 lines · Mathias Nyman

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.

Quoted 9 lines

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.

Quoted 7 lines

Walt Jr Brake, just to be sure could you test this one as well?

As Alan suggested this sets 100ms for the USB 3 roothub but keeps the 20ms for the USB 2 roothub.

Thanks
-Mathias

Yes I tested, it works too.

#15 lore raw

Re: [PATCH] xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay

Quoted 20 lines · Walt Jr. Brake
Quoted 19 lines · Mathias Nyman
Quoted 7 lines · Mathias Nyman

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.

Quoted 9 lines

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.

Walt Jr Brake, just to be sure could you test this one as well?

Quoted 8 lines
Quoted 5 lines

As Alan suggested this sets 100ms for the USB 3 roothub but keeps the 20ms for the USB 2 roothub.

Thanks
-Mathias

Yes I tested, it works too.

Thank you
-Mathias

maintainer
#16 lore raw

Re: [PATCH] xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay

In reply to Mathias Nyman
Quoted 7 lines · Mathias Nyman

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.

Quoted 8 lines

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.

So this needs:

Fixes 90d28fb53d4a ("usb: core: reduce power-on-good delay time of root hub")

right?

thanks,

greg k-h

#17 lore raw

Re: [PATCH] xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay

Quoted 12 lines · Greg KH
Quoted 11 lines · Mathias Nyman

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.

Quoted 8 lines
Quoted 4 lines

Tests indicate full 100ms delay is needed.

So this needs:

Fixes 90d28fb53d4a ("usb: core: reduce power-on-good delay time of root hub")

right?

I guess so, not sure on "Fixes" policy here.

This patch fixes an xhci issue revealed by ("usb: core: reduce power-on-good delay time of root hub") That original patch itself looks correct, but these two patches should really go together to avoid any enumeration issues.

Thanks
-Mathias

maintainer
#18 lore raw

Re: [PATCH] xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay

Quoted 22 lines · Mathias Nyman
Quoted 12 lines · Greg KH
Quoted 11 lines · Mathias Nyman

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.

Quoted 8 lines
Quoted 4 lines

Tests indicate full 100ms delay is needed.

So this needs:

Fixes 90d28fb53d4a ("usb: core: reduce power-on-good delay time of root hub")

right?

Quoted 5 lines

I guess so, not sure on "Fixes" policy here.

This patch fixes an xhci issue revealed by ("usb: core: reduce power-on-good delay time of root hub") That original patch itself looks correct, but these two patches should really go together to avoid any enumeration issues.

Great, I'll use that tag for now so that it will get backported properly.

greg k-h