[SLOF] [PATCH v2 0/5] usb: Add support for USB3 devices behind a hub
Alexey Kardashevskiy
aik at ozlabs.ru
Wed Aug 3 13:25:35 AEST 2016
On 02/08/16 19:19, Thomas Huth wrote:
> 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.
>
> v2:
> - Added comment in the third patch as requested by Nikunj
> - Added a 5th patch that sets the slot context speed according
> to the port status (as suggested by Nikunj)
Thanks, applied.
>
> Thomas Huth (5):
> 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
> usb: Set XHCI slot speed according to port status
>
> lib/libusb/usb-core.h | 1 +
> lib/libusb/usb-hub.c | 49 ++++++++++++++++++++++++++++++++++++++++++-------
> lib/libusb/usb-xhci.c | 49 +++++++++++++++++++++++++++++++++++++++++--------
> lib/libusb/usb-xhci.h | 23 ++++-------------------
> 4 files changed, 88 insertions(+), 34 deletions(-)
>
--
Alexey
More information about the SLOF
mailing list