[SLOF] [PATCH 0/4] usb: Add support for USB3 devices behind a hub
Thomas Huth
thuth at redhat.com
Tue Aug 2 07:50:25 AEST 2016
The current XHCI code in SLOF can not deal with USB devices that
are attached to a hub, since it does not set up the so-called
"route string" in the slot context data yet. For example, with the
following command, SLOF fails to detect the keyboard and it is not
possible to type in any key in the VGA console:
qemu-system-ppc64 -nodefaults -vga std \
-device nec-usb-xhci,id=controller1 \
`for ((i=0;i<32;i++)); do echo " -device usb-mouse" ; done ` \
-device usb-kbd -serial stdio
(since the for loop adds a lot of USB devices, QEMU automatically
adds some USB hubs here inbetween, so that the final usb-kbd
is added behind a USB hub, too).
This patch series now makes sure that we can use USB devices
behind a hub on a XHCI controller too. For this, I had to
increase the amount of available slot contexts, make sure
that the code keeps track of the USB hub topology, and finally
make sure that a correct route string is build from this
topology information.
Thomas Huth (4):
usb: Move XHCI port state arrays from header to .c file
usb: Increase amount of maximum slot IDs and add a sanity check
usb: Initialize USB3 devices on a hub and keep track of hub topology
usb: Build correct route string for USB3 devices behind a hub
lib/libusb/usb-core.h | 1 +
lib/libusb/usb-hub.c | 29 ++++++++++++++++++++++-------
lib/libusb/usb-xhci.c | 47 +++++++++++++++++++++++++++++++++++++++--------
lib/libusb/usb-xhci.h | 23 ++++-------------------
4 files changed, 66 insertions(+), 34 deletions(-)
--
1.8.3.1
More information about the SLOF
mailing list