]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
usbip: tools: support SuperSpeedPlus devices
authorYichong Chen <chenyichong@uniontech.com>
Wed, 17 Jun 2026 02:06:13 +0000 (10:06 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Jul 2026 11:29:13 +0000 (13:29 +0200)
USB devices running at SuperSpeedPlus report "10000" or "20000" in
their sysfs speed attribute. usbip currently maps only "5000" to
USB_SPEED_SUPER, so a SuperSpeedPlus device is imported as
USB_SPEED_UNKNOWN.

The attach request is then rejected by vhci_hcd:

  vhci_hcd: Failed attach request for unsupported USB speed: UNKNOWN

Map the SuperSpeedPlus sysfs speed values to USB_SPEED_SUPER_PLUS, use
the SuperSpeed VHCI hub for SuperSpeedPlus devices, and recognize the
gadget current_speed string used by the kernel.

Fixes: b2316645ca5e ("usb: show speed "10000" in sysfs for USB 3.1 SuperSpeedPlus devices")
Cc: stable <stable@kernel.org>
Signed-off-by: Yichong Chen <chenyichong@uniontech.com>
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Link: https://patch.msgid.link/00C828F338E43447+20260617020613.199086-1-chenyichong@uniontech.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/usb/usbip/libsrc/usbip_common.c
tools/usb/usbip/libsrc/usbip_device_driver.c
tools/usb/usbip/libsrc/vhci_driver.c

index b8d7d480595a8477db79c090cd46ee2f671a4e56..f4734f552d314e0c4f1a8876af88a6b027c210fd 100644 (file)
@@ -29,6 +29,8 @@ static const struct speed_string speed_strings[] = {
        { USB_SPEED_HIGH, "480", "High Speed(480Mbps)" },
        { USB_SPEED_WIRELESS, "53.3-480", "Wireless"},
        { USB_SPEED_SUPER, "5000", "Super Speed(5000Mbps)" },
+       { USB_SPEED_SUPER_PLUS, "10000", "Super Speed Plus(10000Mbps)" },
+       { USB_SPEED_SUPER_PLUS, "20000", "Super Speed Plus(20000Mbps)" },
        { 0, NULL, NULL }
 };
 
index 1dfbb76ab26c3d43e19953f407498e91a02944f9..c9b3619d86f31ecbfa9952a5a73c054a606ea327 100644 (file)
@@ -57,6 +57,10 @@ static struct {
                .speed = USB_SPEED_SUPER,
                .name = "super-speed",
        },
+       {
+               .speed = USB_SPEED_SUPER_PLUS,
+               .name = "super-speed-plus",
+       },
 };
 
 static
index 8159fd98680b4d729ce69b58335a3834855babda..4ca3783ee5b7c15abaa0bea55500debffbe4322e 100644 (file)
@@ -338,6 +338,7 @@ int usbip_vhci_get_free_port(uint32_t speed)
 
                switch (speed) {
                case    USB_SPEED_SUPER:
+               case    USB_SPEED_SUPER_PLUS:
                        if (vhci_driver->idev[i].hub != HUB_SPEED_SUPER)
                                continue;
                break;