Re: USB 3.2 Gen 2x2 "Superspeed+20GBps" support for ASM3242
From: Mathias Nyman <hidden>
Date: 2021-03-09 12:01:25
On 9.3.2021 9.27, Thinh Nguyen wrote:
+ Mathias Hi, William Allen wrote:quoted
I've never submitted to the mailing list before, so please excuse any formalities that I may not be observing. I would like to be able to use USB 3.2 Gen2x2 "SuperSpeed+²⁰Gbps" under Linux. I've tried several different kernel versions, and have built the kernel from the usb-next tree. All without finding proper functionality. I have an Ableconn PEX-UB159 USB 3.2 Gen 2x2 PCIe expansion card, with the ASM3242 controller. This controller appears to be the only Gen2x2 capable controller that exists in commercial products- so far as I've found. Everything appears to work, except for "SuperSpeed+²⁰Gbps" when I plug in a capable device. Here is the dmesg output as soon as I plug in a Gen2x2 WD P50 Black External NVMe SSD, using an appropriate SuperSpeed+²⁰Gbps certified cable: 5.11.2-arch1-1 -------------------- usb 7-2: new SuperSpeedPlus Gen 2 USB device number 3 using xhci_hcd usb 7-2: New USB device found, idVendor=1058, idProduct=2642, bcdDevice=10.03 usb 7-2: New USB device strings: Mfr=2, Product=3, SerialNumber=1 usb 7-2: Product: Game Drive usb 7-2: Manufacturer: Western Digital usb 7-2: SerialNumber: 323130334431343030303736 scsi host11: uas scsi 11:0:0:0: Direct-Access WD Game Drive 1003 PQ: 0 ANSI: 6 scsi 11:0:0:1: Enclosure WD SES Device 1003 PQ: 0 ANSI: 6 sd 11:0:0:0: [sdf] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB) sd 11:0:0:0: [sdf] Write Protect is off sd 11:0:0:0: [sdf] Mode Sense: 57 00 10 00 sd 11:0:0:0: [sdf] Write cache: enabled, read cache: enabled, supports DPO and FUA sd 11:0:0:0: [sdf] Optimal transfer size 33553920 bytes sd 11:0:0:0: [sdf] Attached SCSI disk When I saw commits referring to Gen2x2 in the usb-next repo, I built off that, and also ran linux-next-git.r0.gabaf6f60176f-1 from AUR, both giving me the same results/output: linux-next-git.r0.gabaf6f60176f-1 ---------------------------------------------- usb 5-1: new SuperSpeed Gen 1x2 USB device number 3 using xhci_hcd usb 5-1: New USB device found, idVendor=1058, idProduct=2642, bcdDevice=10.03 usb 5-1: New USB device strings: Mfr=2, Product=3, SerialNumber=1 usb 5-1: Product: Game Drive usb 5-1: Manufacturer: Western Digital usb 5-1: SerialNumber: 323130334431343030303736 scsi host7: uas scsi 7:0:0:0: Direct-Access WD Game Drive 1003 PQ: 0 ANSI: 6 scsi 7:0:0:1: Enclosure WD SES Device 1003 PQ: 0 ANSI: 6 ses 7:0:0:1: Attached Enclosure device ses 7:0:0:1: Failed to get diagnostic page 0x1 ses 7:0:0:1: Failed to bind enclosure -19 sd 7:0:0:0: [sdf] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB) sd 7:0:0:0: [sdf] Write Protect is off sd 7:0:0:0: [sdf] Mode Sense: 57 00 10 00 sd 7:0:0:0: [sdf] Write cache: enabled, read cache: enabled, supports DPO and FUA sd 7:0:0:0: [sdf] Optimal transfer size 33553920 bytes sd 7:0:0:0: [sdf] Attached SCSI disk See that it's detecting it as Gen 1x2. The output of lsusb -t shows that it is connected at 5000M using the uas driver. Even my much slower USB 3.1 SSDs connect at 10000M on the exact same port. When I attach the Gen2x2 NVMe SSD to my other 3.2 Gen2 card, it connects at 10000M, so It seems to be directly related to a mishandling when the Gen2x2 device gets recognized by the Gen2x2 card. lspci output from 5.11.2-arch1-1: ------------------------------------------- USB controller: ASMedia Technology Inc. ASM3242 USB 3.2 Host Controller (prog-if 30 [XHCI]) Subsystem: ASMedia Technology Inc. ASM3242 USB 3.2 Host Controller Physical Slot: 1 Flags: bus master, fast devsel, latency 0, IRQ 62, NUMA node 0 Memory at f7df0000 (64-bit, non-prefetchable) [size=32K] Capabilities: [50] MSI: Enable- Count=1/8 Maskable- 64bit+ Capabilities: [68] MSI-X: Enable+ Count=8 Masked- Capabilities: [78] Power Management version 3 Capabilities: [80] Express Legacy Endpoint, MSI 00 Capabilities: [c0] Subsystem: ASMedia Technology Inc. Device 0201 Capabilities: [100] Advanced Error Reporting Capabilities: [200] Secondary PCI Express Capabilities: [300] Latency Tolerance Reporting Capabilities: [400] L1 PM Substates Kernel driver in use: xhci_hcd Kernel modules: xhci_pci I'm happy to test anything, or file this somewhere more appropriate if you could point me in the right direction.Currently the usb host stack doesn't really support USB 3.2 yet, at least the speed check part. I made some updates to handle that. You apply these patches and test on your setup https://patchwork.kernel.org/project/linux-usb/list/?series=427561 Hopefully Mathias will have time to review and Ack them for the next release cycle.
Thanks for the reminder, added some comments to the series -Mathias