From: Greg KH <gregkh@linuxfoundation.org>
To: "Johannes Brüderl" <johannes.bruederl@gmail.com>
Cc: Michal Pecio <michal.pecio@gmail.com>, linux-usb@vger.kernel.org
Subject: Re: [PATCH v2] usb: core: add USB_QUIRK_NO_BOS for devices that hang on BOS descriptor
Date: Sun, 7 Dec 2025 20:00:53 +0900 [thread overview]
Message-ID: <2025120748-extras-retrain-16eb@gregkh> (raw)
In-Reply-To: <CAP=XvDJJP2orxYcgiKzp0FrQE2UMiXndZe8Z6BdBRFvkujWu5w@mail.gmail.com>
On Sun, Dec 07, 2025 at 11:47:34AM +0100, Johannes Brüderl wrote:
> On Sun, Dec 7, 2025 at 10:45 AM Michal Pecio <michal.pecio@gmail.com> wrote:
> >
> > On Sun, 7 Dec 2025 10:22:41 +0100, Johannes Brüderl wrote:
> > > Here's the BOS Descriptor section when running w/ root.
> > > This is without this patch, so it "reconnected" with SuperSpeed (5Gbps).
> > >
> > > Binary Object Store Descriptor:
> > > bLength 5
> > > bDescriptorType 15
> > > wTotalLength 0x0016
> > > bNumDeviceCaps 2
> > > USB 2.0 Extension Device Capability:
> > > bLength 7
> > > bDescriptorType 16
> > > bDevCapabilityType 2
> > > bmAttributes 0x00000000
> > > (Missing must-be-set LPM bit!)
> > > SuperSpeed USB Device Capability:
> > > bLength 10
> > > bDescriptorType 16
> > > bDevCapabilityType 3
> > > bmAttributes 0x00
> > > wSpeedsSupported 0x000e
> > > Device can operate at Full Speed (12Mbps)
> > > Device can operate at High Speed (480Mbps)
> > > Device can operate at SuperSpeed (5Gbps)
> > > bFunctionalitySupport 3
> > > Lowest fully-functional device speed is SuperSpeed (5Gbps)
> > > bU1DevExitLat 0 micro seconds
> > > bU2DevExitLat 0 micro seconds
> > >
> > > (Missing must-be-set LPM bit!) seems to be weird? As it looks like
> > > just nulled data.
> >
> > OK, so it's broken during enumeration and after enumeration.
> >
> > But that's the "fallback" case after hanging during SS+ enumeration,
> > which we would like to prevent from happening. What about 5gbps ports,
> > does it work correctly at SS or still report zero LPM?
> >
> > And running at SS+ with the patch applied, does the device produce
> > sensible BOS descriptor? The previous one did.
> >
> > What if you extend the patch to also apply at SS? It won't fix LPM
> > during enumeration, but would it fix the descriptor seen by lsusb?
>
> Hello Michal,
>
> very good questions.. the result was surprising to me.
>
> 1) How does it do on 5GBps port?
>
> Without patch:
>
> [ 1522.177297] usb 6-1: new SuperSpeed USB device number 4 using xhci_hcd
> [ 1527.440481] usb 6-1: unable to get BOS descriptor or descriptor too short
> [ 1527.465514] usb 6-1: unable to read config index 0 descriptor/start: -71
> [ 1527.465520] usb 6-1: can't read configurations, error -71
> [ 1527.648035] usb 6-1: new SuperSpeed USB device number 5 using xhci_hcd
> [ 1527.839295] usb 6-1: LPM exit latency is zeroed, disabling LPM.
>
> Looks like the BOS descriptor cannot be read either.
>
> Any, very interesting:
>
> Binary Object Store Descriptor:
> bLength 5
> bDescriptorType 15
> wTotalLength 0x0016
> bNumDeviceCaps 2
> USB 2.0 Extension Device Capability:
> bLength 7
> bDescriptorType 16
> bDevCapabilityType 2
> bmAttributes 0x00000000
> (Missing must-be-set LPM bit!)
> SuperSpeed USB Device Capability:
> bLength 10
> bDescriptorType 16
> bDevCapabilityType 3
> bmAttributes 0x00
> wSpeedsSupported 0x000e
> Device can operate at Full Speed (12Mbps)
> Device can operate at High Speed (480Mbps)
> Device can operate at SuperSpeed (5Gbps)
> bFunctionalitySupport 3
> Lowest fully-functional device speed is SuperSpeed (5Gbps)
> bU1DevExitLat 0 micro seconds
> bU2DevExitLat 0 micro seconds
>
> Very interesting - even reading it "manually" via lsusb - seems to
> fail, even at SS.
>
> 2) Does it produce a sensible BOS descriptor post-patch at SS+ ? It
> looks like it.
> Binary Object Store Descriptor:
> bLength 5
> bDescriptorType 15
> wTotalLength 0x002a
> bNumDeviceCaps 3
> USB 2.0 Extension Device Capability:
> bLength 7
> bDescriptorType 16
> bDevCapabilityType 2
> bmAttributes 0x0000f41e
> BESL Link Power Management (LPM) Supported
> Baseline BESL value 400 us
> Deep BESL value 10000 us
> SuperSpeed USB Device Capability:
> bLength 10
> bDescriptorType 16
> bDevCapabilityType 3
> bmAttributes 0x00
> wSpeedsSupported 0x000e
> Device can operate at Full Speed (12Mbps)
> Device can operate at High Speed (480Mbps)
> Device can operate at SuperSpeed (5Gbps)
> bFunctionalitySupport 1
> Lowest fully-functional device speed is Full Speed (12Mbps)
> bU1DevExitLat 10 micro seconds
> bU2DevExitLat 2047 micro seconds
> SuperSpeedPlus USB Device Capability:
> bLength 20
> bDescriptorType 16
> bDevCapabilityType 10
> bmAttributes 0x00000001
> Sublink Speed Attribute count 2
> Sublink Speed ID count 1
> wFunctionalitySupport 0x1100
> Min functional Speed Attribute ID: 0
> Min functional RX lanes: 1
> Min functional TX lanes: 1
> bmSublinkSpeedAttr[0] 0x000a4030
> Speed Attribute ID: 0 10Gb/s Symmetric RX SuperSpeedPlus
> bmSublinkSpeedAttr[1] 0x000a40b0
> Speed Attribute ID: 0 10Gb/s Symmetric TX SuperSpeedPlus
>
> 3) What if I apply the patch to SS as well?
>
> Connect:
> [ 3.293251] usb 6-1: new SuperSpeed USB device number 2 using xhci_hcd
> [ 3.349030] usb 6-1: skipping BOS descriptor
> [ 3.429817] usb 6-1: New USB device found, idVendor=0fd9,
> idProduct=009c, bcdDevice= 0.02
> [ 3.429825] usb 6-1: New USB device strings: Mfr=6, Product=7, SerialNumber=3
> [ 3.429828] usb 6-1: Product: Elgato 4K X
> [ 3.429830] usb 6-1: Manufacturer: Elgato
> [ 3.429833] usb 6-1: SerialNumber: A7SNB517214G5K
> [ 9.019651] usb 6-1: 3:2: failed to get current value for ch 0 (-22)
> [ 9.028103] usb 6-1: Found UVC 1.00 device Elgato 4K X (0fd9:009c)
>
> sudo lsusb -v -d 0fd9:009c
> Binary Object Store Descriptor:
> bLength 5
> bDescriptorType 15
> wTotalLength 0x0016
> bNumDeviceCaps 2
> USB 2.0 Extension Device Capability:
> bLength 7
> bDescriptorType 16
> bDevCapabilityType 2
> bmAttributes 0x00000000
> (Missing must-be-set LPM bit!)
> SuperSpeed USB Device Capability:
> bLength 10
> bDescriptorType 16
> bDevCapabilityType 3
> bmAttributes 0x00
> wSpeedsSupported 0x000e
> Device can operate at Full Speed (12Mbps)
> Device can operate at High Speed (480Mbps)
> Device can operate at SuperSpeed (5Gbps)
> bFunctionalitySupport 3
> Lowest fully-functional device speed is SuperSpeed (5Gbps)
> bU1DevExitLat 0 micro seconds
> bU2DevExitLat 0 micro seconds
>
> Again (Missing must-be-set LPM bit!).
>
> So.. if i summarize it correctly: on SS, BOS fetch seems to fail
> immediately when connecting, but also "later" when I use lsusb.
> But, on SS+, if i skip BOS fetch on connect, it works when done later...
>
> For what it's worth: I've recorded a few hours of Gameplay with the
> patch, and rebooted a couple times, it seems to do the trick.
This is really odd. I just picked one of these devices up and will try
this out next week when I get a chance to connect it to a system that
isn't just my laptop (I don't think my laptop's usb ports are that fast,
but I could be wrong, will try it out later this week...)
thanks,
greg k-h
next prev parent reply other threads:[~2025-12-07 11:00 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-07 0:00 [PATCH] usb: core: add USB_QUIRK_NO_BOS for devices that hang on BOS descriptor Johannes Brüderl
2025-12-07 0:15 ` Greg KH
2025-12-07 1:20 ` [PATCH v2] " Johannes Brüderl
2025-12-07 6:19 ` Lars Melin
2025-12-07 9:02 ` [PATCH v3 1/1] " Johannes Brüderl
2026-01-07 16:06 ` Greg KH
2025-12-07 7:40 ` [PATCH v2] " Michal Pecio
2025-12-07 9:22 ` Johannes Brüderl
2025-12-07 9:45 ` Michal Pecio
2025-12-07 10:47 ` Johannes Brüderl
2025-12-07 11:00 ` Greg KH [this message]
2025-12-07 21:12 ` Greg KH
2025-12-07 22:06 ` Michal Pecio
2025-12-08 8:58 ` Oliver Neukum
2025-12-08 20:46 ` Greg KH
2025-12-28 12:54 ` Johannes Brüderl
2025-12-28 13:18 ` Greg KH
2025-12-07 0:37 ` [PATCH] " Michal Pecio
2025-12-07 0:59 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2025120748-extras-retrain-16eb@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=johannes.bruederl@gmail.com \
--cc=linux-usb@vger.kernel.org \
--cc=michal.pecio@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox