[PATCH] usb-host: map LIBUSB_SPEED_SUPER_PLUS to USB_SPEED_SUPER

Gerd Hoffmann posted 1 patch 4 years, 10 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210119170342.2120680-1-kraxel@redhat.com
Maintainers: Gerd Hoffmann <kraxel@redhat.com>
There is a newer version of this series
hw/usb/host-libusb.c | 2 ++
1 file changed, 2 insertions(+)
[PATCH] usb-host: map LIBUSB_SPEED_SUPER_PLUS to USB_SPEED_SUPER
Posted by Gerd Hoffmann 4 years, 10 months ago
Handle host superspeedplus (usb 3.1+) devices like superspeed (usb 3.0)
devices.  That is enough to get them handled properly by xhci.  They show
up as superspeed devices inside the guest, but should be able to actually
run at higher speeds.

Reported-by: Angel Pagan <Angel.Pagan@stratus.com>
Tested-by: Angel Pagan <Angel.Pagan@stratus.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/usb/host-libusb.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
index b950501d100f..cb12e513c450 100644
--- a/hw/usb/host-libusb.c
+++ b/hw/usb/host-libusb.c
@@ -186,6 +186,7 @@ static const char *speed_name[] = {
     [LIBUSB_SPEED_FULL]    = "12",
     [LIBUSB_SPEED_HIGH]    = "480",
     [LIBUSB_SPEED_SUPER]   = "5000",
+    [LIBUSB_SPEED_SUPER_PLUS] = "5000+",
 };
 
 static const unsigned int speed_map[] = {
@@ -193,6 +194,7 @@ static const unsigned int speed_map[] = {
     [LIBUSB_SPEED_FULL]    = USB_SPEED_FULL,
     [LIBUSB_SPEED_HIGH]    = USB_SPEED_HIGH,
     [LIBUSB_SPEED_SUPER]   = USB_SPEED_SUPER,
+    [LIBUSB_SPEED_SUPER_PLUS] = USB_SPEED_SUPER,
 };
 
 static const unsigned int status_map[] = {
-- 
2.29.2