0

From what I understand, devices connected to different controllers should show up under different USB busses. However, when I connect a keyboard to the xHCI controller, it is still listed under one of the EHCI busses. See the >>>> markers in the listings:

$ lspci | grep -i usb
>>>> 00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 04)
00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 04)
00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 04)

$ lspci -vs 00:14.0
00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 04) (prog-if 30 [XHCI])
Subsystem: ASUSTeK Computer Inc. 8 Series/C220 Series Chipset Family USB xHCI
Flags: bus master, medium devsel, latency 0, IRQ 27
Memory at ef920000 (64-bit, non-prefetchable) [size=64K]
Capabilities: [70] Power Management version 2
Capabilities: [80] MSI: Enable+ Count=1/8 Maskable- 64bit+
Kernel driver in use: xhci_hcd

So I do indeed have an xHCI controller. It is a separate physical port on the motherboard.

$lsusb
Bus 002 Device 002: ID 8087:8000 Intel Corp. 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>>>> Bus 004 Device 002: ID 174c:3074 ASMedia Technology Inc. ASM1074 SuperSpeed hub
>>>> Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 014: ID 046d:c03d Logitech, Inc. M-BT96a Pilot Optical Mouse
Bus 003 Device 015: ID 195d:2030 Itron Technology iONE 
Bus 003 Device 013: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 003 Device 012: ID 0424:2228 Standard Microsystems Corp. 9-in-2 Card Reader
Bus 003 Device 011: ID 0424:2602 Standard Microsystems Corp. USB 2.0 Hub
Bus 003 Device 010: ID 0424:2512 Standard Microsystems Corp. USB 2.0 Hub
Bus 003 Device 003: ID 174c:2074 ASMedia Technology Inc. ASM1074 High-Speed hub
>>>> Bus 003 Device 016: ID 03f0:0024 Hewlett-Packard KU-0316 Keyboard
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

The "superspeed" 3.0 hub on bus 004 should be the xHCI controller. The keyboard, however, is attached to bus 003:

$lsusb -t
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
    |__ Port 3: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/14p, 480M
>>>>|__ Port 1: Dev 16, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
    |__ Port 3: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 2: Dev 10, If 0, Class=Hub, Driver=hub/2p, 480M
            |__ Port 1: Dev 11, If 0, Class=Hub, Driver=hub/4p, 480M
                |__ Port 1: Dev 12, If 0, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 3: Dev 13, If 0, Class=Hub, Driver=hub/4p, 480M
                    |__ Port 2: Dev 15, If 0, Class=Human Interface Device, Driver=usbhid, 12M
                    |__ Port 2: Dev 15, If 1, Class=Human Interface Device, Driver=usbhid, 12M
                    |__ Port 2: Dev 15, If 2, Class=Human Interface Device, Driver=usbhid, 12M
                |__ Port 4: Dev 14, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M

In fact, no matter how I connect devices to physical controllers, they always show up under the same bus. Does anyone have a clue what might be going on?

System

Processor: Intel(R) Core(TM) i7-4771 CPU @ 3.50GHz
OS: Debian GNU/Linux testing (buster) with ACS patch, IOMMU enabled.
Kernel: Linux 4.10.0-acs+ (x86_64)
Version: #3 SMP PREEMPT Sun Feb 26 00:03:48 CET 2017
Processor: Intel(R) Core(TM) i7-4771 CPU @ 3.50GHz : 3900.00 MHz
Board: Asus Z87-PRO
BIOS: AMI version 1707, VT-d/x enabled
0

USB 3.0 in 5G mode isn't compatible to USB 2.0 or earlier, so the way they implemented compatibility is to use one pin pair in the same position as for USB 2.0 for legacy devices, and two new pin pairs for "real" USB 3.0 devices, as you can see e.g. in the pinout on Wikipedia.

So your 00:14.0 xHCI controller is really two controllers in one: A USB 2.0 legacy controller for the "old" pair in each connector, which shows up as bus 3 (with 14 ports), and a "real" USB 3.0 controller for the two "new" pairs in each connector, which shows up as bus 4 (with 6 ports).

Some of your USB connectors will be marked blue on your PC, and they are connected to both controllers. If you plug in a USB 2.0 device, it will physically connect to bus 3, while if you plug in a "real" USB 3.0, it will physically connect to bus 4. That's why different devices plugged into the same connector can show up on one or the other bus.

Also note that the legacy controller has a lot more ports, and is also connected to some hubs. I don't know if you connected any external hubs, and how many, but there are also internal hubs on the motherboard.

So it's entirely possible all your connectors just belong to the xHCI controller, and the two other EHCI controllers that lspci shows aren't actually connected to anything (or possibly to connectors on the motherboard).

The way to find out is to connect a USB 2.0 device to each connector in turn, write down on which bus, and under which port (and port of hubs) it shows up. Then repeat the same exercise with a "real" USB 3.0 device, and you should know how the USB connectors are set up.

  • Thanks for the explanation. I have made the rounds over most of the internal ports on the MB (there are 5). I can't reach all of them anymore without disassembling the PC but that probably doesn't matter. All of the internal hubs are attached to the same PCI controller (it's a pity lsusb does not or cannot reveal this). To prove the theory I passed the 00:14.0 controller to a guest OS and completely lost all of my USB ports in the host OS. – Klas Lindberg Feb 4 '18 at 23:31
1

The xHCI controller has actually two buses in one. The superspeed bus:

/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M

... and the traditional USB2 one:

/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/14p, 480M

Note that both are using the xhci_hcd driver.

This is probably to minimize the interference of older, slower devices to the much faster USB3+ devices at all layers of the USB implementation.

  • So does that mean that a device will only show up under bus 004 if it is a xHCI device? It is still a mystery to me why devices never show up on any of the other busses no matter how I plug them. There are several physical ports on the mother board after all. – Klas Lindberg Feb 4 '18 at 13:38
  • A device will show up under bus 004 only if it is a superspeed USB3 device. Your BIOS may also have a setting to choose whether to use USB devices in a "compatible" (i.e. revert USB2 and older devices to EHCI controller, so that non-USB3-aware OSs can use them) or "native" way (everything controlled by xHCI). – telcoM Feb 4 '18 at 16:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.