* Re: [PATCH v2] usb: core: reduce power-on-good delay time of root hub
@ 2021-11-05 10:00 ` Greg Kroah-Hartman
0 siblings, 0 replies; 48+ messages in thread
From: Greg Kroah-Hartman @ 2021-11-05 10:00 UTC (permalink / raw)
To: Mathias Nyman
Cc: Walt Jr. Brake, Alan Stern, Mathias Nyman, Chunfeng Yun,
Matthias Brugger, Nishad Kamdar, linux-usb, linux-kernel,
linux-arm-kernel, linux-mediatek, Eddie Hung
On Wed, Nov 03, 2021 at 10:37:33PM +0200, Mathias Nyman wrote:
> On 2.11.2021 22.29, Walt Jr. Brake wrote:
> > On 2/11/2021 17:05, Mathias Nyman wrote:
> >> On 1.11.2021 16.06, Alan Stern wrote:
> >>> On Sat, Oct 30, 2021 at 12:49:37PM +0800, Walt Jr. Brake wrote:
> >>>> 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
> >>>>
> >>>>
> >>>> diff --git a/drivers/usb/core/hub.h b/drivers/usb/core/hub.h
> >>>> index 22ea1f4f2d66..73f4482d833a 100644
> >>>> --- a/drivers/usb/core/hub.h
> >>>> +++ b/drivers/usb/core/hub.h
> >>>> @@ -148,10 +148,8 @@ static inline unsigned hub_power_on_good_delay(struct
> >>>> usb_hub *hub)
> >>>> {
> >>>> 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
> >>>
> >> 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.
> >>
> >> diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
> >> index a3f875eea751..756231a55602 100644
> >> --- a/drivers/usb/host/xhci-hub.c
> >> +++ b/drivers/usb/host/xhci-hub.c
> >> @@ -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
> >
> > 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.
> >
>
> 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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH v2] usb: core: reduce power-on-good delay time of root hub
@ 2021-11-05 10:00 ` Greg Kroah-Hartman
0 siblings, 0 replies; 48+ messages in thread
From: Greg Kroah-Hartman @ 2021-11-05 10:00 UTC (permalink / raw)
To: Mathias Nyman
Cc: Walt Jr. Brake, Alan Stern, Mathias Nyman, Chunfeng Yun,
Matthias Brugger, Nishad Kamdar, linux-usb, linux-kernel,
linux-arm-kernel, linux-mediatek, Eddie Hung
On Wed, Nov 03, 2021 at 10:37:33PM +0200, Mathias Nyman wrote:
> On 2.11.2021 22.29, Walt Jr. Brake wrote:
> > On 2/11/2021 17:05, Mathias Nyman wrote:
> >> On 1.11.2021 16.06, Alan Stern wrote:
> >>> On Sat, Oct 30, 2021 at 12:49:37PM +0800, Walt Jr. Brake wrote:
> >>>> 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
> >>>>
> >>>>
> >>>> diff --git a/drivers/usb/core/hub.h b/drivers/usb/core/hub.h
> >>>> index 22ea1f4f2d66..73f4482d833a 100644
> >>>> --- a/drivers/usb/core/hub.h
> >>>> +++ b/drivers/usb/core/hub.h
> >>>> @@ -148,10 +148,8 @@ static inline unsigned hub_power_on_good_delay(struct
> >>>> usb_hub *hub)
> >>>> {
> >>>> 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
> >>>
> >> 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.
> >>
> >> diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
> >> index a3f875eea751..756231a55602 100644
> >> --- a/drivers/usb/host/xhci-hub.c
> >> +++ b/drivers/usb/host/xhci-hub.c
> >> @@ -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
> >
> > 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.
> >
>
> 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
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH v2] usb: core: reduce power-on-good delay time of root hub
2021-11-05 10:00 ` Greg Kroah-Hartman
(?)
@ 2021-11-05 13:30 ` Alan Stern
-1 siblings, 0 replies; 48+ messages in thread
From: Alan Stern @ 2021-11-05 13:30 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Mathias Nyman, Walt Jr. Brake, Mathias Nyman, Chunfeng Yun,
Matthias Brugger, Nishad Kamdar, linux-usb, linux-kernel,
linux-arm-kernel, linux-mediatek, Eddie Hung
On Fri, Nov 05, 2021 at 11:00:31AM +0100, Greg Kroah-Hartman wrote:
> On Wed, Nov 03, 2021 at 10:37:33PM +0200, Mathias Nyman wrote:
> > On 2.11.2021 22.29, Walt Jr. Brake wrote:
> > > On 2/11/2021 17:05, Mathias Nyman wrote:
> > >> On 1.11.2021 16.06, Alan Stern wrote:
> > >>> On Sat, Oct 30, 2021 at 12:49:37PM +0800, Walt Jr. Brake wrote:
> > >>>> 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
> > >>>>
> > >>>>
> > >>>> diff --git a/drivers/usb/core/hub.h b/drivers/usb/core/hub.h
> > >>>> index 22ea1f4f2d66..73f4482d833a 100644
> > >>>> --- a/drivers/usb/core/hub.h
> > >>>> +++ b/drivers/usb/core/hub.h
> > >>>> @@ -148,10 +148,8 @@ static inline unsigned hub_power_on_good_delay(struct
> > >>>> usb_hub *hub)
> > >>>> {
> > >>>> 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
> > >>>
> > >> 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.
> > >>
> > >> diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
> > >> index a3f875eea751..756231a55602 100644
> > >> --- a/drivers/usb/host/xhci-hub.c
> > >> +++ b/drivers/usb/host/xhci-hub.c
> > >> @@ -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
> > >
> > > 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.
> > >
> >
> > 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
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH v2] usb: core: reduce power-on-good delay time of root hub
@ 2021-11-05 13:30 ` Alan Stern
0 siblings, 0 replies; 48+ messages in thread
From: Alan Stern @ 2021-11-05 13:30 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Mathias Nyman, Walt Jr. Brake, Mathias Nyman, Chunfeng Yun,
Matthias Brugger, Nishad Kamdar, linux-usb, linux-kernel,
linux-arm-kernel, linux-mediatek, Eddie Hung
On Fri, Nov 05, 2021 at 11:00:31AM +0100, Greg Kroah-Hartman wrote:
> On Wed, Nov 03, 2021 at 10:37:33PM +0200, Mathias Nyman wrote:
> > On 2.11.2021 22.29, Walt Jr. Brake wrote:
> > > On 2/11/2021 17:05, Mathias Nyman wrote:
> > >> On 1.11.2021 16.06, Alan Stern wrote:
> > >>> On Sat, Oct 30, 2021 at 12:49:37PM +0800, Walt Jr. Brake wrote:
> > >>>> 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
> > >>>>
> > >>>>
> > >>>> diff --git a/drivers/usb/core/hub.h b/drivers/usb/core/hub.h
> > >>>> index 22ea1f4f2d66..73f4482d833a 100644
> > >>>> --- a/drivers/usb/core/hub.h
> > >>>> +++ b/drivers/usb/core/hub.h
> > >>>> @@ -148,10 +148,8 @@ static inline unsigned hub_power_on_good_delay(struct
> > >>>> usb_hub *hub)
> > >>>> {
> > >>>> 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
> > >>>
> > >> 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.
> > >>
> > >> diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
> > >> index a3f875eea751..756231a55602 100644
> > >> --- a/drivers/usb/host/xhci-hub.c
> > >> +++ b/drivers/usb/host/xhci-hub.c
> > >> @@ -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
> > >
> > > 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.
> > >
> >
> > 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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH v2] usb: core: reduce power-on-good delay time of root hub
@ 2021-11-05 13:30 ` Alan Stern
0 siblings, 0 replies; 48+ messages in thread
From: Alan Stern @ 2021-11-05 13:30 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Mathias Nyman, Walt Jr. Brake, Mathias Nyman, Chunfeng Yun,
Matthias Brugger, Nishad Kamdar, linux-usb, linux-kernel,
linux-arm-kernel, linux-mediatek, Eddie Hung
On Fri, Nov 05, 2021 at 11:00:31AM +0100, Greg Kroah-Hartman wrote:
> On Wed, Nov 03, 2021 at 10:37:33PM +0200, Mathias Nyman wrote:
> > On 2.11.2021 22.29, Walt Jr. Brake wrote:
> > > On 2/11/2021 17:05, Mathias Nyman wrote:
> > >> On 1.11.2021 16.06, Alan Stern wrote:
> > >>> On Sat, Oct 30, 2021 at 12:49:37PM +0800, Walt Jr. Brake wrote:
> > >>>> 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
> > >>>>
> > >>>>
> > >>>> diff --git a/drivers/usb/core/hub.h b/drivers/usb/core/hub.h
> > >>>> index 22ea1f4f2d66..73f4482d833a 100644
> > >>>> --- a/drivers/usb/core/hub.h
> > >>>> +++ b/drivers/usb/core/hub.h
> > >>>> @@ -148,10 +148,8 @@ static inline unsigned hub_power_on_good_delay(struct
> > >>>> usb_hub *hub)
> > >>>> {
> > >>>> 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
> > >>>
> > >> 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.
> > >>
> > >> diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
> > >> index a3f875eea751..756231a55602 100644
> > >> --- a/drivers/usb/host/xhci-hub.c
> > >> +++ b/drivers/usb/host/xhci-hub.c
> > >> @@ -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
> > >
> > > 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.
> > >
> >
> > 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
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 48+ messages in thread
* [PATCH] xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay
2021-11-05 13:30 ` Alan Stern
(?)
@ 2021-11-05 16:00 ` Mathias Nyman
-1 siblings, 0 replies; 48+ messages in thread
From: Mathias Nyman @ 2021-11-05 16:00 UTC (permalink / raw)
To: stern, gregkh
Cc: mr.yming81, chunfeng.yun, matthias.bgg, nishadkamdar, linux-usb,
linux-kernel, linux-arm-kernel, linux-mediatek, eddie.hung,
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.
Tests indicate full 100ms delay is needed.
Reported-by: Walt Jr. Brake <mr.yming81@gmail.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
---
drivers/usb/host/xhci-hub.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
index a3f875eea751..af946c42b6f0 100644
--- a/drivers/usb/host/xhci-hub.c
+++ b/drivers/usb/host/xhci-hub.c
@@ -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.
--
2.25.1
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH] xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay
@ 2021-11-05 16:00 ` Mathias Nyman
0 siblings, 0 replies; 48+ messages in thread
From: Mathias Nyman @ 2021-11-05 16:00 UTC (permalink / raw)
To: stern, gregkh
Cc: mr.yming81, chunfeng.yun, matthias.bgg, nishadkamdar, linux-usb,
linux-kernel, linux-arm-kernel, linux-mediatek, eddie.hung,
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.
Tests indicate full 100ms delay is needed.
Reported-by: Walt Jr. Brake <mr.yming81@gmail.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
---
drivers/usb/host/xhci-hub.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
index a3f875eea751..af946c42b6f0 100644
--- a/drivers/usb/host/xhci-hub.c
+++ b/drivers/usb/host/xhci-hub.c
@@ -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.
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH] xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay
@ 2021-11-05 16:00 ` Mathias Nyman
0 siblings, 0 replies; 48+ messages in thread
From: Mathias Nyman @ 2021-11-05 16:00 UTC (permalink / raw)
To: stern, gregkh
Cc: mr.yming81, chunfeng.yun, matthias.bgg, nishadkamdar, linux-usb,
linux-kernel, linux-arm-kernel, linux-mediatek, eddie.hung,
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.
Tests indicate full 100ms delay is needed.
Reported-by: Walt Jr. Brake <mr.yming81@gmail.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
---
drivers/usb/host/xhci-hub.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
index a3f875eea751..af946c42b6f0 100644
--- a/drivers/usb/host/xhci-hub.c
+++ b/drivers/usb/host/xhci-hub.c
@@ -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.
--
2.25.1
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply related [flat|nested] 48+ messages in thread
* Re: [PATCH] xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay
2021-11-05 16:00 ` Mathias Nyman
(?)
@ 2021-11-05 16:09 ` Mathias Nyman
-1 siblings, 0 replies; 48+ messages in thread
From: Mathias Nyman @ 2021-11-05 16:09 UTC (permalink / raw)
To: Walt Jr. Brake
Cc: chunfeng.yun, matthias.bgg, nishadkamdar, linux-usb,
linux-kernel, linux-arm-kernel, linux-mediatek, eddie.hung,
Alan Stern, Greg KH
On 5.11.2021 18.00, Mathias Nyman wrote:
> 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 <mr.yming81@gmail.com>
> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
>
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
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH] xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay
@ 2021-11-05 16:09 ` Mathias Nyman
0 siblings, 0 replies; 48+ messages in thread
From: Mathias Nyman @ 2021-11-05 16:09 UTC (permalink / raw)
To: Walt Jr. Brake
Cc: chunfeng.yun, matthias.bgg, nishadkamdar, linux-usb,
linux-kernel, linux-arm-kernel, linux-mediatek, eddie.hung,
Alan Stern, Greg KH
On 5.11.2021 18.00, Mathias Nyman wrote:
> 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 <mr.yming81@gmail.com>
> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
>
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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH] xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay
@ 2021-11-05 16:09 ` Mathias Nyman
0 siblings, 0 replies; 48+ messages in thread
From: Mathias Nyman @ 2021-11-05 16:09 UTC (permalink / raw)
To: Walt Jr. Brake
Cc: chunfeng.yun, matthias.bgg, nishadkamdar, linux-usb,
linux-kernel, linux-arm-kernel, linux-mediatek, eddie.hung,
Alan Stern, Greg KH
On 5.11.2021 18.00, Mathias Nyman wrote:
> 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 <mr.yming81@gmail.com>
> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
>
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
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH] xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay
2021-11-05 16:09 ` Mathias Nyman
(?)
@ 2021-11-05 17:32 ` Walt Jr. Brake
-1 siblings, 0 replies; 48+ messages in thread
From: Walt Jr. Brake @ 2021-11-05 17:32 UTC (permalink / raw)
To: Mathias Nyman
Cc: chunfeng.yun, matthias.bgg, nishadkamdar, linux-usb,
linux-kernel, linux-arm-kernel, linux-mediatek, eddie.hung,
Alan Stern, Greg KH
On 6/11/2021 00:09, Mathias Nyman wrote:
> On 5.11.2021 18.00, Mathias Nyman wrote:
>> 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 <mr.yming81@gmail.com>
>> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
>>
> 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.
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH] xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay
@ 2021-11-05 17:32 ` Walt Jr. Brake
0 siblings, 0 replies; 48+ messages in thread
From: Walt Jr. Brake @ 2021-11-05 17:32 UTC (permalink / raw)
To: Mathias Nyman
Cc: chunfeng.yun, matthias.bgg, nishadkamdar, linux-usb,
linux-kernel, linux-arm-kernel, linux-mediatek, eddie.hung,
Alan Stern, Greg KH
On 6/11/2021 00:09, Mathias Nyman wrote:
> On 5.11.2021 18.00, Mathias Nyman wrote:
>> 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 <mr.yming81@gmail.com>
>> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
>>
> 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.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH] xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay
@ 2021-11-05 17:32 ` Walt Jr. Brake
0 siblings, 0 replies; 48+ messages in thread
From: Walt Jr. Brake @ 2021-11-05 17:32 UTC (permalink / raw)
To: Mathias Nyman
Cc: chunfeng.yun, matthias.bgg, nishadkamdar, linux-usb,
linux-kernel, linux-arm-kernel, linux-mediatek, eddie.hung,
Alan Stern, Greg KH
On 6/11/2021 00:09, Mathias Nyman wrote:
> On 5.11.2021 18.00, Mathias Nyman wrote:
>> 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 <mr.yming81@gmail.com>
>> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
>>
> 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.
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH] xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay
2021-11-05 17:32 ` Walt Jr. Brake
(?)
@ 2021-11-05 19:41 ` Mathias Nyman
-1 siblings, 0 replies; 48+ messages in thread
From: Mathias Nyman @ 2021-11-05 19:41 UTC (permalink / raw)
To: Walt Jr. Brake
Cc: chunfeng.yun, matthias.bgg, nishadkamdar, linux-usb,
linux-kernel, linux-arm-kernel, linux-mediatek, eddie.hung,
Alan Stern, Greg KH
On 5.11.2021 19.32, Walt Jr. Brake wrote:
> On 6/11/2021 00:09, Mathias Nyman wrote:
>> On 5.11.2021 18.00, Mathias Nyman wrote:
>>> 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 <mr.yming81@gmail.com>
>>> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
>>>
>> 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.
>
Thank you
-Mathias
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH] xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay
@ 2021-11-05 19:41 ` Mathias Nyman
0 siblings, 0 replies; 48+ messages in thread
From: Mathias Nyman @ 2021-11-05 19:41 UTC (permalink / raw)
To: Walt Jr. Brake
Cc: chunfeng.yun, matthias.bgg, nishadkamdar, linux-usb,
linux-kernel, linux-arm-kernel, linux-mediatek, eddie.hung,
Alan Stern, Greg KH
On 5.11.2021 19.32, Walt Jr. Brake wrote:
> On 6/11/2021 00:09, Mathias Nyman wrote:
>> On 5.11.2021 18.00, Mathias Nyman wrote:
>>> 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 <mr.yming81@gmail.com>
>>> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
>>>
>> 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.
>
Thank you
-Mathias
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH] xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay
@ 2021-11-05 19:41 ` Mathias Nyman
0 siblings, 0 replies; 48+ messages in thread
From: Mathias Nyman @ 2021-11-05 19:41 UTC (permalink / raw)
To: Walt Jr. Brake
Cc: chunfeng.yun, matthias.bgg, nishadkamdar, linux-usb,
linux-kernel, linux-arm-kernel, linux-mediatek, eddie.hung,
Alan Stern, Greg KH
On 5.11.2021 19.32, Walt Jr. Brake wrote:
> On 6/11/2021 00:09, Mathias Nyman wrote:
>> On 5.11.2021 18.00, Mathias Nyman wrote:
>>> 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 <mr.yming81@gmail.com>
>>> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
>>>
>> 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.
>
Thank you
-Mathias
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH] xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay
2021-11-05 16:00 ` Mathias Nyman
(?)
@ 2021-11-05 16:15 ` Greg KH
-1 siblings, 0 replies; 48+ messages in thread
From: Greg KH @ 2021-11-05 16:15 UTC (permalink / raw)
To: Mathias Nyman
Cc: stern, mr.yming81, chunfeng.yun, matthias.bgg, nishadkamdar,
linux-usb, linux-kernel, linux-arm-kernel, linux-mediatek,
eddie.hung
On Fri, Nov 05, 2021 at 06:00:36PM +0200, Mathias Nyman wrote:
> 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 <mr.yming81@gmail.com>
> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
So this needs:
Fixes: 90d28fb53d4a ("usb: core: reduce power-on-good delay time of root hub")
right?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH] xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay
@ 2021-11-05 16:15 ` Greg KH
0 siblings, 0 replies; 48+ messages in thread
From: Greg KH @ 2021-11-05 16:15 UTC (permalink / raw)
To: Mathias Nyman
Cc: stern, mr.yming81, chunfeng.yun, matthias.bgg, nishadkamdar,
linux-usb, linux-kernel, linux-arm-kernel, linux-mediatek,
eddie.hung
On Fri, Nov 05, 2021 at 06:00:36PM +0200, Mathias Nyman wrote:
> 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 <mr.yming81@gmail.com>
> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
So this needs:
Fixes: 90d28fb53d4a ("usb: core: reduce power-on-good delay time of root hub")
right?
thanks,
greg k-h
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH] xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay
@ 2021-11-05 16:15 ` Greg KH
0 siblings, 0 replies; 48+ messages in thread
From: Greg KH @ 2021-11-05 16:15 UTC (permalink / raw)
To: Mathias Nyman
Cc: stern, mr.yming81, chunfeng.yun, matthias.bgg, nishadkamdar,
linux-usb, linux-kernel, linux-arm-kernel, linux-mediatek,
eddie.hung
On Fri, Nov 05, 2021 at 06:00:36PM +0200, Mathias Nyman wrote:
> 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 <mr.yming81@gmail.com>
> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
So this needs:
Fixes: 90d28fb53d4a ("usb: core: reduce power-on-good delay time of root hub")
right?
thanks,
greg k-h
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH] xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay
2021-11-05 16:15 ` Greg KH
(?)
@ 2021-11-05 19:56 ` Mathias Nyman
-1 siblings, 0 replies; 48+ messages in thread
From: Mathias Nyman @ 2021-11-05 19:56 UTC (permalink / raw)
To: Greg KH
Cc: stern, mr.yming81, chunfeng.yun, matthias.bgg, nishadkamdar,
linux-usb, linux-kernel, linux-arm-kernel, linux-mediatek,
eddie.hung
On 5.11.2021 18.15, Greg KH wrote:
> On Fri, Nov 05, 2021 at 06:00:36PM +0200, Mathias Nyman wrote:
>> 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 <mr.yming81@gmail.com>
>> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
>
> 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
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH] xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay
@ 2021-11-05 19:56 ` Mathias Nyman
0 siblings, 0 replies; 48+ messages in thread
From: Mathias Nyman @ 2021-11-05 19:56 UTC (permalink / raw)
To: Greg KH
Cc: stern, mr.yming81, chunfeng.yun, matthias.bgg, nishadkamdar,
linux-usb, linux-kernel, linux-arm-kernel, linux-mediatek,
eddie.hung
On 5.11.2021 18.15, Greg KH wrote:
> On Fri, Nov 05, 2021 at 06:00:36PM +0200, Mathias Nyman wrote:
>> 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 <mr.yming81@gmail.com>
>> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
>
> 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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH] xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay
@ 2021-11-05 19:56 ` Mathias Nyman
0 siblings, 0 replies; 48+ messages in thread
From: Mathias Nyman @ 2021-11-05 19:56 UTC (permalink / raw)
To: Greg KH
Cc: stern, mr.yming81, chunfeng.yun, matthias.bgg, nishadkamdar,
linux-usb, linux-kernel, linux-arm-kernel, linux-mediatek,
eddie.hung
On 5.11.2021 18.15, Greg KH wrote:
> On Fri, Nov 05, 2021 at 06:00:36PM +0200, Mathias Nyman wrote:
>> 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 <mr.yming81@gmail.com>
>> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
>
> 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
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH] xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay
2021-11-05 19:56 ` Mathias Nyman
(?)
@ 2021-11-06 14:41 ` Greg KH
-1 siblings, 0 replies; 48+ messages in thread
From: Greg KH @ 2021-11-06 14:41 UTC (permalink / raw)
To: Mathias Nyman
Cc: stern, mr.yming81, chunfeng.yun, matthias.bgg, nishadkamdar,
linux-usb, linux-kernel, linux-arm-kernel, linux-mediatek,
eddie.hung
On Fri, Nov 05, 2021 at 09:56:59PM +0200, Mathias Nyman wrote:
> On 5.11.2021 18.15, Greg KH wrote:
> > On Fri, Nov 05, 2021 at 06:00:36PM +0200, Mathias Nyman wrote:
> >> 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 <mr.yming81@gmail.com>
> >> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
> >
> > 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.
Great, I'll use that tag for now so that it will get backported
properly.
greg k-h
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH] xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay
@ 2021-11-06 14:41 ` Greg KH
0 siblings, 0 replies; 48+ messages in thread
From: Greg KH @ 2021-11-06 14:41 UTC (permalink / raw)
To: Mathias Nyman
Cc: stern, mr.yming81, chunfeng.yun, matthias.bgg, nishadkamdar,
linux-usb, linux-kernel, linux-arm-kernel, linux-mediatek,
eddie.hung
On Fri, Nov 05, 2021 at 09:56:59PM +0200, Mathias Nyman wrote:
> On 5.11.2021 18.15, Greg KH wrote:
> > On Fri, Nov 05, 2021 at 06:00:36PM +0200, Mathias Nyman wrote:
> >> 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 <mr.yming81@gmail.com>
> >> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
> >
> > 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.
Great, I'll use that tag for now so that it will get backported
properly.
greg k-h
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH] xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay
@ 2021-11-06 14:41 ` Greg KH
0 siblings, 0 replies; 48+ messages in thread
From: Greg KH @ 2021-11-06 14:41 UTC (permalink / raw)
To: Mathias Nyman
Cc: stern, mr.yming81, chunfeng.yun, matthias.bgg, nishadkamdar,
linux-usb, linux-kernel, linux-arm-kernel, linux-mediatek,
eddie.hung
On Fri, Nov 05, 2021 at 09:56:59PM +0200, Mathias Nyman wrote:
> On 5.11.2021 18.15, Greg KH wrote:
> > On Fri, Nov 05, 2021 at 06:00:36PM +0200, Mathias Nyman wrote:
> >> 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 <mr.yming81@gmail.com>
> >> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
> >
> > 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.
Great, I'll use that tag for now so that it will get backported
properly.
greg k-h
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 48+ messages in thread