You are not logged in.

#1 2013-06-11 04:36:05

hangten
Member
Registered: 2012-03-26
Posts: 25

USB bus controllers xhci ehci ohci webcam

I have a rosewill webcam rcm-8163 that works under the ehci_hcd driver on bus 5 (see below) but not the others (xhci, ohci).  The ehci usb ports happen to be at the front of my PC and I want to plug the camera into usb ports at the back of PC, however, the usb ports at back of PC are not assigned to ehci.  When I plug the camera into the back ports (which happen to be usb 3.0 ports) the camera shows up under usb bus 10 which is driven by xhci_hcd and does not work. 

Is there a way to assign a driver to a particular usb bus or port?

...or can anyone shed any light on this situation? 

Others have had the same problem with cameras but not good solutions offered.  I have narrowed it down to the usb bus controllers but no further.

tbattist:~$ lsusb -t
/:  Bus 13.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 5000M
/:  Bus 12.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
    |__ Port 2: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
    |__ Port 2: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
/:  Bus 11.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 5000M
/:  Bus 10.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
/:  Bus 09.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 5000M
/:  Bus 08.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
/:  Bus 07.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 5000M
/:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/5p, 480M
    |__ Port 3: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 480M
    |__ Port 4: Dev 3, If 0, Class=Video, Driver=uvcvideo, 480M
    |__ Port 4: Dev 3, If 1, Class=Video, Driver=uvcvideo, 480M
    |__ Port 4: Dev 3, If 2, Class=Audio, Driver=snd-usb-audio, 480M
    |__ Port 4: Dev 3, If 3, Class=Audio, Driver=snd-usb-audio, 480M
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/5p, 480M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ohci_hcd/2p, 12M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ohci_hcd/5p, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ohci_hcd/5p, 12M
tbattist:~$ lsusb -t
/:  Bus 13.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 5000M
/:  Bus 12.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
    |__ Port 2: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
    |__ Port 2: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
/:  Bus 11.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 5000M
/:  Bus 10.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
    |__ Port 1: Dev 3, If 0, Class=Video, Driver=uvcvideo, 480M
    |__ Port 1: Dev 3, If 1, Class=Video, Driver=uvcvideo, 480M
    |__ Port 1: Dev 3, If 2, Class=Audio, Driver=snd-usb-audio, 480M
    |__ Port 1: Dev 3, If 3, Class=Audio, Driver=snd-usb-audio, 480M
/:  Bus 09.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 5000M
/:  Bus 08.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
/:  Bus 07.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 5000M
/:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/5p, 480M
    |__ Port 3: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 480M
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/5p, 480M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ohci_hcd/2p, 12M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ohci_hcd/5p, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ohci_hcd/5p, 12M

Offline

#2 2013-06-11 11:08:39

mich41
Member
Registered: 2012-06-22
Posts: 796

Re: USB bus controllers xhci ehci ohci webcam

It seems that you have a USB2 controller integrated in the chipset connected to motherboard USB headers and a separate USB3 chip connected to rear ports. If this is indeed the case then obviously there's no way to reassign ports between controllers without modding the motherboard.

It's possible that not all rear ports are 3.0, check this. Also, you can try a PCI bracket with USB ports that connect to motherboard USB headers or PCI/PCIe USB2 controller card.

Check whether Windows users also have this problem as it could be either some hardware issue or Linux driver bug which hopefully can be fixed.

Check dmesg.

Last edited by mich41 (2013-06-11 11:55:13)

Offline

#3 2013-06-11 18:33:26

hangten
Member
Registered: 2012-03-26
Posts: 25

Re: USB bus controllers xhci ehci ohci webcam

Mich41...That's about what I am thinking.  The way the kernel launches modules relative to discovering hardware has always been magical for me.  And I know sometimes one can bias the module launches with options in modprobe.d. 

I am curious to know how folks identify their usb ports.  Right now the only way for me to determine this is by (un)plugging devices in and out and watching the log.

Offline

#4 2013-06-11 20:50:34

mich41
Member
Registered: 2012-06-22
Posts: 796

Re: USB bus controllers xhci ehci ohci webcam

There's no magic; OHCIs get OHCI driver, EHCIs get EHCI driver, XHCIs get XHCI driver. The kernel tells them apart by identification numbers programmed into all PCI devices.

Typical USB 1+2 stack looks like this:

EHCI ------------- ROOT HUB         - EHCI and USB2 root hub shared by lots of ports
OHCI -- ROOT HUB ---|-|-|-+--- PORT - OHCI and USB1 root hub shared by few ports
                \---|-|-+----- PORT - switches (+) connect USB1 devices to USB1 hub and USB2 devices to USB2 hub (if the corresponding port on USB2 hub is enabled)
OHCI -- ROOT HUB ---|-+------- PORT - all other connections are permanently fixed
                \---+--------- PORT
There can be a second independent set of EHCI + few OHCIs + many ports.

Each device in USB1 mode connected to the same physical port always appears at the same port of the same OHCI root hub.
Each device in USB2 mode connected to the same physical port always appears at the same port of EHCI root hub. If this port or whole EHCI is disabled (for example by blacklisting EHCI driver), the device is forced to switch to USB1 mode and gets attached to OHCI.

The above situation may look like "changing drivers", but in fact it's device being moved between controllers by the hardware. Host controllers and their drivers don't change.

USB3 is a different story. Here everything is packed in a single PCI device called XHCI which can only be understood by special XHCI driver. You can't use old drivers to run USB1/USB2 parts of XHCI separately from the rest.

As for finding port numbers, yes, lsusb or watching dmesg is the only way besides tracing motherboard wiring.

Last edited by mich41 (2013-06-11 21:39:17)

Offline

#5 2013-06-12 06:18:43

hangten
Member
Registered: 2012-03-26
Posts: 25

Re: USB bus controllers xhci ehci ohci webcam

Nice explanation mich41.  I suppose these PCI identification numbers are industry standard and there is a hardware standards commitee that sets the numbers for software folks to use.  Thanks.

Offline

Board footer

Powered by FluxBB