[SLOF] Keyboard not working when using XHCI as a USB host controller?

Nikunj A Dadhania nikunj at linux.vnet.ibm.com
Wed Aug 5 14:06:54 AEST 2015


Thomas Huth <thuth at redhat.com> writes:

>  Hi!
>
> When I use the following command line to start a guest:
>
>  qemu-system-ppc64 -machine pseries,accel=kvm,usb=off \
> 	-device pci-ohci,id=usb,bus=pci.0,addr=0x2 \
> 	-device usb-kbd,id=input0 -nographic -vga none
>
> ... SLOF correctly discoveres a keyboard during USB scan:
>
>  Scanning USB 
>    OHCI: initializing
>      USB Keyboard 
>  ...
>  0 > devalias  
>  keyboard : /pci at 800000020000000/usb at 2/usb-keyboard at 1
>  usb0 : /pci at 800000020000000/usb at 2
>  ...
>
> However, when I start with an XHCI (or EHCI) controller
> instead:
>
>  qemu-system-ppc64 -machine pseries,accel=kvm,usb=off \
> 	-device nec-usb-xhci,id=usb,bus=pci.0,addr=0x2 \
> 	-device usb-kbd,id=input0 -nographic -vga none
>
> ... SLOF does not discover any keyboard:
>
>  Scanning USB 
>    XHCI: Initializing
>   ...
>  0 > devalias  
>  usb0 : /pci at 800000020000000/usb at 2
>  ...
>
> Is this supposed to work? Am I doing something wrong?

No, I have never tested this configuration.

I tried enabling debugs in lib/libusb/usb-xhci.c, I dont see the port
reporting on this device.

info qtree gives this:

    bus: pci.0
      type PCI
      dev: nec-usb-xhci, id "usb"
        msi = true
        msix = true
        superspeed-ports-first = true
        force-pcie-endcap = false
        streams = true
        intrs = 16 (0x10)
        slots = 64 (0x40)
        p2 = 4 (0x4)
        p3 = 4 (0x4)
        addr = 02.0
        romfile = ""
        rombar = 1 (0x1)
        multifunction = false
        command_serr_enable = true
        class USB controller, addr 00:02.0, pci id 1033:0194 (sub 1af4:1100)
        bar 0: mem at 0x100000000 [0x100003fff]
        bus: usb.0
          type usb-bus
          dev: usb-kbd, id "input0"
            usb_version = 2 (0x2)
            display = ""
            port = ""
            serial = ""
            full-path = true
            msos-desc = true
            addr 0.0, port 1, speed 480, name QEMU USB Keyboard, attached


I suspect that usb-version = 2 would be the reason, the code does not
see this port.

Regards
Nikunj



More information about the SLOF mailing list