Gentoo Archives: gentoo-user

From: Sid Spry <sid@××××.us>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: new USB question
Date: Tue, 06 Oct 2020 04:45:55
Message-Id: 18ac179e-c2e8-414b-a5dc-bbe8e42edfcf@www.fastmail.com
In Reply to: Re: [gentoo-user] Re: new USB question by Jack
1 On Mon, Oct 5, 2020, at 1:33 PM, Jack wrote:
2 > Grant - thanks for the info.
3 >
4 > I'm curious about the pairing by PCI device - it's not clear if the
5 > every root_hub is a real controller, or not. The specs of the board
6 > say USB2: two ports on the back and two USB2 headers (so I don't know
7 > why it claims 10 ports instead of 6) and USB3: three type A and one
8 > Type C ports on the back. Bus 2 is a bit of a mystery, as although the
9 > B350 chipset presumably does have an enhanced superspeed (3.1)
10 > controller, it is not available through the motherboard. If bus 3 is
11 > the unavailable 3.1 controller, then is bus 1 driven by the CPU or the
12 > chipset, and where is the other one? So far, anything plugged into any
13 > of the front ports or rear USB2 ports shows up on bus 1, and anything
14 > plugged into the rear USB3 ports shows up on bus 3. I think my new USB
15 > flash drive is really USB2 and not USB3 as advertised.
16 >
17
18 Logically I think the controllers are separate, but they are spawned from
19 the same device. On an ARM64 system there is a single DWC3 device
20 per USB3/2 pair. Intel is moving to DesignWare's IP, and I think
21 existing platforms that split devices are similar. Additionally the xHCI
22 driver is now being used to drive all USB bus types.
23
24 If you want to test this you can unbind the driver from individual PCIe
25 devices. Check /sys/bus/pci/devices and see what disappears.
26
27 On a development board I see:
28
29 $ lsusb -t
30 /: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
31 /: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
32 /: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M
33 /: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M
34 /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
35 /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
36
37 And I happen to know the first 2 lines are the platform device at fe900000.
38 If I disable that device both disappear.
39
40 However, as I tried to describe earlier, on most x86 systems I have used
41 it is possible to actually plug a USB2 device into a port associated with
42 a USB3 root hub and the output would be rewritten as such:
43
44 $ lsusb -t
45 /: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
46 /: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
47
48 When all USB2 devices are removed the bus speed returns to 5000M.
49
50 I suspect you are encountering some variation of this. Can you unplug
51 absolutely everything and see the speeds reported by lsusb -t? Then,
52 plug things in and see if they change. If you've already done this my
53 apologies, it's kind of hard to find the text among all the dmesg.
54
55 > Later, I'll reboot into Windows to see what that shows, as MSI tech
56 > support refuses to talk about Linux.
57 >
58
59 It may be worth pointing out the platform implements standards that are
60 divorced from the OS you are running. If it doesn't work with both it
61 can still be their problem.
62
63 Recently I had to do a differential test using Windows, assuming it'd
64 be more featureful. It is. But Windows has issues with device enumeration.
65 I am wondering if the original link speed problems (USB2 devices slowing
66 down USB3 busses) was a Linux-specific issue, or if it was just
67 only visible to me on Linux.
68
69 I think I am encountering some variation of your problem, but mine is
70 even weirder. I have control over the device which is USB-C. In one
71 cable orientation it will enumerate with Windows, in the other it will not.
72 In that same orientation it will enumerate against an ARM64 system
73 as USB3. In the other orientation it will enumerate against ARM64/x86
74 systems as USB2. It seems to be unable to enumerate as a USB3
75 device on Linux, but I need to do more testing.
76
77 A friend of mine reports he has a USB-C cable that is not reversible.
78 This may not be the cable's fault.
79
80 So: Check your cable, and try more than one device. Also there may be
81 bugs in either the kernel's xhci drivers or new USB3 hardware.

Replies

Subject Author
Re: [gentoo-user] Re: new USB question Jack <ostroffjh@×××××××××××××××××.net>