I just received my PCIe USB3.1 adapter this evening. The model is “StarTech.com PEXUSB312A3” sold as “StarTech USB3.1 adapter with UASP support”, which shows up like this:
rock@rock-5b:~$ lspci -nn
0000:00:00.0 PCI bridge [0604]: Fuzhou Rockchip Electronics Co., Ltd Device [1d87:3588] (rev 01)
0000:01:00.0 USB controller [0c03]: ASMedia Technology Inc. ASM2142 USB 3.1 Host Controller [1b21:2142]
0004:40:00.0 PCI bridge [0604]: Fuzhou Rockchip Electronics Co., Ltd Device [1d87:3588] (rev 01)
0004:41:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller [10ec:8125] (rev 04)
Thus I could run the test again with the Crucial X8 SSD. TL;DR: it works perfectly now :
# dd if=/dev/sda of=/dev/null bs=1M status=progress
12495880192 bytes (12 GB, 12 GiB) copied, 15 s, 832 MB/s^C
Look at the “bi” column during the test, I’ve seen it reach 1 GB/s once:
rock@rock-5b:~$ vmstat 1
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
r b swpd free buff cache si so bi bo in cs us sy id wa st
1 0 0 3505692 23376 132156 0 0 23475 18 463 450 1 4 94 1 0
1 0 0 3505692 23376 132156 0 0 0 0 1226 1561 0 1 99 0 0
2 0 0 3248208 281420 131996 0 0 192584 36 2904 2637 0 3 96 1 0
2 0 0 2328076 1198868 134476 0 0 982980 0 9351 6751 0 8 87 4 0
0 1 0 1408228 2116316 136324 0 0 917448 0 9566 6934 0 9 86 5 0
1 1 0 488048 3033764 138620 0 0 917448 0 8981 6404 0 9 86 4 0
2 0 0 246848 3276656 139924 0 0 775352 0 9026 6328 0 14 83 4 0
2 0 0 250976 3271576 141448 0 0 765112 0 8572 6469 0 14 82 4 0
2 0 0 243664 3277176 142964 0 0 742984 12 9057 6661 0 15 81 4 0
0 1 0 260476 3257040 144916 0 0 832076 0 9725 7007 0 15 81 4 0
2 0 0 245108 3272296 146544 0 0 774548 0 9136 7019 0 14 82 3 0
1 0 0 251768 3264428 148080 0 0 816308 0 9735 7497 0 15 81 4 0
0 1 0 276760 3236952 149696 0 0 733800 0 8483 6261 0 14 82 4 0
1 0 0 263156 3249680 151388 0 0 896260 0 10610 8162 0 13 83 4 0
2 0 0 247468 3263040 153240 0 0 769476 0 9244 6621 0 15 81 3 0
0 1 0 261800 3247116 154872 0 0 811076 0 9356 6831 0 15 81 3 0
3 0 0 242204 3263760 156572 0 0 787256 0 9312 6775 0 14 82 4 0
^C
So that tells us that:
- the USB stack and xhci driver in the Rockchip BSP kernel are OK
- the SSD indeed supports UAS well, just like the kernel
- the issues when using the local USB ports (either USB2 or USB3) are definitely related to the rockchip USB controller or to the connection between it and the USB3 connectors. I tend to think that it’s very likely an issue within the driver itself given that it doesn’t particularly work better in USB2 (at least we should hope for this).
For those interested, here’s what the kernel says about the USB card:
[ 2.729508] xhci_hcd 0000:01:00.0: xHCI Host Controller
[ 2.729533] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 10
[ 2.729555] xhci_hcd 0000:01:00.0: Host supports USB 3.1 Enhanced SuperSpeed
[ 2.729652] usb usb10: We don't know the algorithms for LPM for this host, disabling LPM.
[ 2.729785] usb usb10: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.10
[ 2.729800] usb usb10: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.729813] usb usb10: Product: xHCI Host Controller
[ 2.729825] usb usb10: Manufacturer: Linux 5.10.66-267861-g55f540ce97a3 xhci-hcd
[ 2.729837] usb usb10: SerialNumber: 0000:01:00.0
[ 2.730589] hub 10-0:1.0: USB hub found
what appears in kernel messages when I connect the SSD:
[ 32.805961] usb 10-1: new SuperSpeedPlus Gen 2 USB device number 2 using xhci_hcd
[ 32.833698] usb 10-1: New USB device found, idVendor=0634, idProduct=5600, bcdDevice= 1.00
[ 32.833718] usb 10-1: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[ 32.833726] usb 10-1: Product: Crucial X8 SSD
[ 32.833732] usb 10-1: Manufacturer: Micron Technology Inc
[ 32.833738] usb 10-1: SerialNumber: 2124E3297853
[ 32.865379] scsi host0: uas
[ 33.807846] scsi 0:0:0:0: Direct-Access Micron Crucial X8 SSD 0 PQ: 0 ANSI: 6
[ 33.809603] sd 0:0:0:0: [sda] 1953525168 512-byte logical blocks: (1.00 TB/932 GiB)
[ 33.809723] sd 0:0:0:0: [sda] Write Protect is off
[ 33.809732] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
[ 33.809905] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 33.810593] sd 0:0:0:0: [sda] Optimal transfer size 33553920 bytes
[ 33.837781] sda: sda1
[ 33.840421] sd 0:0:0:0: [sda] Attached SCSI disk
[ 33.852544] vcc3v3_pcie2x1l0: disabling