Dear USB subsystem maintainers,

I have a Lexar E300 M.2 SSD enclosure (idVendor=0x21c4, idProduct=0xb083)
that supports USB 3.2 Gen 2 (10 Gbps). Under Linux it always negotiates
down to 5 Gbps, while on Windows the same hardware (cable, port) works
correctly at 10 Gbps (CrystalDiskMark ~1087 MB/s vs ~450 MB/s on Linux).

The kernel log shows that the device initially attempts SuperSpeed Plus
(Gen 2x1) but fails to provide a valid BOS descriptor, causing an error
-71 and a forced fallback to SuperSpeed (5 Gbps):

[  179.146227] usb 2-1: new SuperSpeed Plus Gen 2x1 USB device number 4 using xhci_hcd
[  182.237405] usb 2-1: USB disconnect, device number 4
[  182.420843] sd 12:0:0:0: [sda] Synchronize Cache(10) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[  182.552343] usb usb2-port1: config error
[  183.131966] usb 2-1: new SuperSpeed USB device number 5 using xhci_hcd

"lsusb -t" always reports the device at 5000M, even when connected to a
20 Gbps port.

I have reliable reports that other users on Ubuntu experience the
identical issue with the same enclosure.

The likely cause is that the enclosure's firmware does not handle the
BOS descriptor request correctly. The fix is to mark it with the
USB_QUIRK_NO_BOS flag, already existsting in previous kernels
(since commit 7b2f6c5b1b1c, "USB: core: Add quirk for devices that
can't handle BOS"). That quirk would prevent the kernel from trying to
read the BOS descriptor and thus avoid the downgrade.

i did try to add the following entry to drivers/usb/core/quirks.c
in the usb_quirk_list[]:

{ USB_DEVICE(0x21c4, 0xb083), .driver_info = USB_QUIRK_NO_BOS },

I am running Arch Linux with kernel 7.0.3 (in the recent version does not contain
the NO_BOS definition in its source), so I have been unable to test the
patch myself. However, I am fully available to test any patch or
directly apply and verify a fix if a developer can provide one. I can
also provide additional debug output if needed.

Thank you for your time and for maintaining the USB subsystem.

Best regards, 

Miguel Angel Ruiz Gallego
c2mismo@tuta.io