[SLOF] SLOF cannot setup peripherals behind an XHCI hub

Laurent Vivier lvivier at redhat.com
Tue Jul 5 23:24:33 AEST 2016


Hi,

I need some help on this...

If I put USB peripherals behind an USB hub, behind an XHCI controller,
SLOF cannot use them.

-device nec-usb-xhci,id=controller1  \
-device usb-hub,id=usbhub1,bus=controller1.0,port=1  \
-device usb-mouse,id=usbmouse,port=1.1 \
-device usb-kbd,id=usbkbd,port=1.2  \
-device usb-tablet,id=usbtablet,port=1.3 \

It works fine with pci-ohci controller or if I put peripherals directly
on the XHCI controller (ports 2, 3, 4).

Scanning USB
  XHCI: Initializing
    USB HUB
usb-hub: unable to setup device on port 0
usb-hub: unable to setup device on port 1
usb-hub: unable to setup device on port 2

QEMU tree is:

        class USB controller, addr 00:00.0, pci id 1033:0194 (sub 1af4:1100)
        bar 0: mem at 0x100000000 [0x100003fff]
        bus: controller1.0
          type usb-bus
          dev: usb-tablet, id "usbtablet"
            usb_version = 2 (0x2)
            display = ""
            head = 0 (0x0)
            port = "1.3"
            serial = ""
            full-path = true
            msos-desc = true
            addr 0.4, port 1.3, speed 12, name QEMU USB Tablet, attached
          dev: usb-kbd, id "usbkbd"
            usb_version = 2 (0x2)
            display = ""
            port = "1.2"
            serial = ""
            full-path = true
            msos-desc = true
            addr 0.3, port 1.2, speed 12, name QEMU USB Keyboard, attached
          dev: usb-mouse, id "usbmouse"
            usb_version = 2 (0x2)
            port = "1.1"
            serial = ""
            full-path = true
            msos-desc = true
            addr 0.2, port 1.1, speed 12, name QEMU USB Mouse, attached
          dev: usb-hub, id "usbhub1"
            port = "1"
            serial = ""
            full-path = true
            msos-desc = true
            addr 0.1, port 1, speed 12, name QEMU USB Hub, attached

And Linux correctly detects them:

[    0.121617] usbcore: registered new interface driver usbfs
[    0.121699] usbcore: registered new interface driver hub
[    0.121872] usbcore: registered new device driver usb
[    0.605459] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    0.605543] usb usb1: New USB device strings: Mfr=3, Product=2,
SerialNumber=1
[    0.605642] usb usb1: Product: xHCI Host Controller
[    0.605710] usb usb1: Manufacturer: Linux 3.10.0-442.el7.ppc64le xhci-hcd
[    0.605793] usb usb1: SerialNumber: 0000:00:00.0
[    0.606720] usb usb2: We don't know the algorithms for LPM for this
host, disabling LPM.
[    0.606836] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[    0.606919] usb usb2: New USB device strings: Mfr=3, Product=2,
SerialNumber=1
[    0.607019] usb usb2: Product: xHCI Host Controller
[    0.607085] usb usb2: Manufacturer: Linux 3.10.0-442.el7.ppc64le xhci-hcd
[    0.607167] usb usb2: SerialNumber: 0000:00:00.0
[    0.607755] usbcore: registered new interface driver usbserial
[    0.607842] usbcore: registered new interface driver usbserial_generic
[    0.607929] usbserial: USB Serial support registered for generic
[    0.608674] usbcore: registered new interface driver usbhid
[    0.608740] usbhid: USB HID core driver
[    0.928016] usb 1-1: new full-speed USB device number 2 using xhci_hcd
[    1.077435] usb 1-1: New USB device found, idVendor=0409, idProduct=55aa
[    1.077534] usb 1-1: New USB device strings: Mfr=1, Product=2,
SerialNumber=3
[    1.077635] usb 1-1: Product: QEMU USB Hub
[    1.077687] usb 1-1: Manufacturer: QEMU
[    1.077738] usb 1-1: SerialNumber: 314159-pci at 800000020000000:00.0-1
[    1.356019] usb 1-1.1: new full-speed USB device number 3 using xhci_hcd
[    1.466303] usb 1-1.1: not running at top speed; connect to a high
speed hub
[    1.467430] usb 1-1.1: New USB device found, idVendor=0627,
idProduct=0001
[    1.467547] usb 1-1.1: New USB device strings: Mfr=1, Product=2,
SerialNumber=5
[    1.467676] usb 1-1.1: Product: QEMU USB Mouse
[    1.467767] usb 1-1.1: Manufacturer: QEMU
[    1.467833] usb 1-1.1: SerialNumber: 42
[    1.476830] input: QEMU QEMU USB Mouse as
/devices/pci0000:00/0000:00:00.0/usb1/1-1/1-1.1/1-1.1:1.0/input/input0
[    1.477121] hid-generic 0003:0627:0001.0001: input,hidraw0: USB HID
v0.01 Mouse [QEMU QEMU USB Mouse] on usb-0000:00:00.0-1.1/input0
[    1.556021] usb 1-1.2: new full-speed USB device number 4 using xhci_hcd
[    1.656425] usb 1-1.2: not running at top speed; connect to a high
speed hub
[    1.657397] usb 1-1.2: New USB device found, idVendor=0627,
idProduct=0001
[    1.657521] usb 1-1.2: New USB device strings: Mfr=1, Product=4,
SerialNumber=5
[    1.657647] usb 1-1.2: Product: QEMU USB Keyboard
[    1.657735] usb 1-1.2: Manufacturer: QEMU
[    1.657800] usb 1-1.2: SerialNumber: 42
[    1.659105] input: QEMU QEMU USB Keyboard as
/devices/pci0000:00/0000:00:00.0/usb1/1-1/1-1.2/1-1.2:1.0/input/input1
[    1.716082] hid-generic 0003:0627:0001.0002: input,hidraw1: USB HID
v1.11 Keyboard [QEMU QEMU USB Keyboard] on usb-0000:00:00.0-1.2/input0
[    1.796009] usb 1-1.3: new full-speed USB device number 5 using xhci_hcd
[    1.896431] usb 1-1.3: not running at top speed; connect to a high
speed hub
[    1.897313] usb 1-1.3: New USB device found, idVendor=0627,
idProduct=0001
[    1.897399] usb 1-1.3: New USB device strings: Mfr=1, Product=3,
SerialNumber=5
[    1.897482] usb 1-1.3: Product: QEMU USB Tablet
[    1.897538] usb 1-1.3: Manufacturer: QEMU
[    1.897581] usb 1-1.3: SerialNumber: 42
[    1.898823] input: QEMU QEMU USB Tablet as
/devices/pci0000:00/0000:00:00.0/usb1/1-1/1-1.3/1-1.3:1.0/input/input2
[    1.899020] hid-generic 0003:0627:0001.0003: input,hidraw2: USB HID
v0.01 Pointer [QEMU QEMU USB Tablet] on usb-0000:00:00.0-1.3/input0

Any idea?

Thanks,
Laurent


More information about the SLOF mailing list