* [PATCH] usbip: tools: support SuperSpeedPlus devices
@ 2026-06-17 2:06 Yichong Chen
2026-06-25 15:48 ` Shuah Khan
0 siblings, 1 reply; 2+ messages in thread
From: Yichong Chen @ 2026-06-17 2:06 UTC (permalink / raw)
To: valentina.manea.m, shuah
Cc: i, gregkh, zhouzongmin, mathias.nyman, linux-usb, linux-kernel,
chenyichong
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")
Signed-off-by: Yichong Chen <chenyichong@uniontech.com>
---
tools/usb/usbip/libsrc/usbip_common.c | 2 ++
tools/usb/usbip/libsrc/usbip_device_driver.c | 4 ++++
tools/usb/usbip/libsrc/vhci_driver.c | 1 +
3 files changed, 7 insertions(+)
diff --git a/tools/usb/usbip/libsrc/usbip_common.c b/tools/usb/usbip/libsrc/usbip_common.c
index b8d7d480595a..f4734f552d31 100644
--- a/tools/usb/usbip/libsrc/usbip_common.c
+++ b/tools/usb/usbip/libsrc/usbip_common.c
@@ -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 }
};
diff --git a/tools/usb/usbip/libsrc/usbip_device_driver.c b/tools/usb/usbip/libsrc/usbip_device_driver.c
index 1dfbb76ab26c..c9b3619d86f3 100644
--- a/tools/usb/usbip/libsrc/usbip_device_driver.c
+++ b/tools/usb/usbip/libsrc/usbip_device_driver.c
@@ -57,6 +57,10 @@ static struct {
.speed = USB_SPEED_SUPER,
.name = "super-speed",
},
+ {
+ .speed = USB_SPEED_SUPER_PLUS,
+ .name = "super-speed-plus",
+ },
};
static
diff --git a/tools/usb/usbip/libsrc/vhci_driver.c b/tools/usb/usbip/libsrc/vhci_driver.c
index 8159fd98680b..4ca3783ee5b7 100644
--- a/tools/usb/usbip/libsrc/vhci_driver.c
+++ b/tools/usb/usbip/libsrc/vhci_driver.c
@@ -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;
--
2.51.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] usbip: tools: support SuperSpeedPlus devices
2026-06-17 2:06 [PATCH] usbip: tools: support SuperSpeedPlus devices Yichong Chen
@ 2026-06-25 15:48 ` Shuah Khan
0 siblings, 0 replies; 2+ messages in thread
From: Shuah Khan @ 2026-06-25 15:48 UTC (permalink / raw)
To: Yichong Chen, valentina.manea.m, shuah, Greg Kroah-Hartman
Cc: i, gregkh, zhouzongmin, mathias.nyman, linux-usb, linux-kernel,
Shuah Khan
On 6/16/26 20:06, Yichong Chen wrote:
> 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")
> Signed-off-by: Yichong Chen <chenyichong@uniontech.com>
> ---
> tools/usb/usbip/libsrc/usbip_common.c | 2 ++
> tools/usb/usbip/libsrc/usbip_device_driver.c | 4 ++++
> tools/usb/usbip/libsrc/vhci_driver.c | 1 +
> 3 files changed, 7 insertions(+)
>
> diff --git a/tools/usb/usbip/libsrc/usbip_common.c b/tools/usb/usbip/libsrc/usbip_common.c
> index b8d7d480595a..f4734f552d31 100644
> --- a/tools/usb/usbip/libsrc/usbip_common.c
> +++ b/tools/usb/usbip/libsrc/usbip_common.c
> @@ -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 }
> };
>
> diff --git a/tools/usb/usbip/libsrc/usbip_device_driver.c b/tools/usb/usbip/libsrc/usbip_device_driver.c
> index 1dfbb76ab26c..c9b3619d86f3 100644
> --- a/tools/usb/usbip/libsrc/usbip_device_driver.c
> +++ b/tools/usb/usbip/libsrc/usbip_device_driver.c
> @@ -57,6 +57,10 @@ static struct {
> .speed = USB_SPEED_SUPER,
> .name = "super-speed",
> },
> + {
> + .speed = USB_SPEED_SUPER_PLUS,
> + .name = "super-speed-plus",
> + },
> };
>
> static
> diff --git a/tools/usb/usbip/libsrc/vhci_driver.c b/tools/usb/usbip/libsrc/vhci_driver.c
> index 8159fd98680b..4ca3783ee5b7 100644
> --- a/tools/usb/usbip/libsrc/vhci_driver.c
> +++ b/tools/usb/usbip/libsrc/vhci_driver.c
> @@ -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;
This looks good to me.
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Greg, Please pick this up.
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-06-25 15:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-17 2:06 [PATCH] usbip: tools: support SuperSpeedPlus devices Yichong Chen
2026-06-25 15:48 ` Shuah Khan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®