So some time ago I bought ASM3142 M.2 USB controller. It’s pretty niche stuff but basically it’s thing like this:
https://pl.aliexpress.com/item/1005005642956632.html
And photo in case link expires some day:
So long story short it’s just pci-e based USB 3.2 Gen 2 controller in M.2 form factor. Neat stuff if you run out of pci-e slots in your PC (which I did).
And it should be 10G. Many linux commands suggest that it should in matter of fact be 10G, but for whatever reason end-device establishes always 5G connection (here with USB M.2 adapter):
lapsio@wrx ~> lspci| grep -i asm31
d2:00.0 USB controller: ASMedia Technology Inc. ASM3142 USB 3.2 Gen 2x1 xHCI Controller
lapsio@wrx ~> lsusb -vt | grep -i uas -B2 -A1
/: Bus 006.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/2p, 10000M
ID 1d6b:0003 Linux Foundation 3.0 root hub
|__ Port 001: Dev 007, If 0, Class=Mass Storage, Driver=uas, 5000M
ID 0bda:9210 Realtek Semiconductor Corp. RTL9210 M.2 NVME Adapter
As you can see it connects at 5000M bandwidth… However it actually reaches 10G speeds… because AliExpress for you…
lapsio@wrx ~> sudo sh -c "sync; echo 3 > /proc/sys/vm/drop_caches"
lapsio@wrx ~> sudo dd if=/dev/sdl of=/dev/null status=progress iflag=direct bs=512M
1168767975424 bytes (1.2 TB, 1.1 TiB) copied, 1381 s, 846 MB/s^C
2178+0 records in
2177+0 records out
1168767975424 bytes (1.2 TB, 1.1 TiB) copied, 1381.63 s, 846 MB/s
Okay I know it’s not full 1GB/s but I copied 1TB of data and drive got quite hot because of that so there are other factors - the important part is that it totally does peak at around 950-980 MB/s which is 10G USB territory. Despite claiming to connect at “5000M”.
However that’s not all. I tried to connect it to 10G USB HUB and then stuff gets even funnier because now it works at 5000M speed despite claiming to work at 10000M speed xD:
lapsio@wrx ~> sudo sh -c "sync; echo 3 > /proc/sys/vm/drop_caches"
lapsio@wrx ~> sudo dd if=/dev/sdl of=/dev/null status=progress iflag=direct bs=512M
52076478464 bytes (52 GB, 48 GiB) copied, 80 s, 649 MB/s^C
98+0 records in
97+0 records out
52076478464 bytes (52 GB, 48 GiB) copied, 81.0758 s, 642 MB/s
And here’s registered topology:
lapsio@wrx ~> lsusb -vt | grep -i uas -B4 -A1
/: Bus 006.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/2p, 10000M
ID 1d6b:0003 Linux Foundation 3.0 root hub
|__ Port 002: Dev 002, If 0, Class=Hub, Driver=hub/4p, 5000M
ID 14b0:012e StarTech.com Ltd.
|__ Port 001: Dev 008, If 0, Class=Mass Storage, Driver=uas, 10000M
ID 0bda:9210 Realtek Semiconductor Corp. RTL9210 M.2 NVME Adapter
Note that I’m using the same cable and stuff, very good TB3 cables actually to make sure it’s not cable related issue.
And well we could say “what’s the issue?” since drive works at 10G speed when connected directly so what’s the problem? Well the problem is that I kinda don’t want to connect this drive directly and I’d very much prefer to use HUB… AND I’m using this controller with external HDD enclosure which internally registers as… 4 SATA controllers on USB HUB. So I do get capped at 5000M speed again!
So does anyone know what’s going on here? Is there any way to force HUBs to negotiate to 10000M?