* [PATCH] usbip: tools: support SuperSpeed Plus devices
@ 2026-06-22 10:08 raoxu
2026-06-22 19:20 ` Shuah Khan
2026-06-25 15:09 ` Greg KH
0 siblings, 2 replies; 5+ messages in thread
From: raoxu @ 2026-06-22 10:08 UTC (permalink / raw)
To: valentina.manea.m; +Cc: shuah, i, linux-usb, linux-kernel, raoxu
From: Xu Rao <raoxu@uniontech.com>
USB/IP reads a remote device's speed from the server-side sysfs
"speed" attribute. read_attr_speed() converts the string to
enum usb_device_speed before the value is sent to the client.
The conversion table only recognizes 5000 Mbps. Devices reporting
10000 or 20000 Mbps are therefore sent as USB_SPEED_UNKNOWN. The
client then selects a USB 2.0 VHCI port, and the kernel rejects the
attach request because USB_SPEED_UNKNOWN is not a supported speed.
Map both SuperSpeed Plus sysfs values to USB_SPEED_SUPER_PLUS and
select the SuperSpeed VHCI hub for that speed.
The issue was reproduced with the following server hardware:
xHCI controller: Intel 8086:a0ed, revision 20
Subsystem: Lenovo 17aa:382a
USB device: Silicon Motion 090c:2320 mass storage
sysfs speed: 10000 Mbps
Before the change:
$ usbip attach -r 10.20.12.170 -b 2-2
usbip: error: import device
After the change, the device attaches and uses usb-storage:
$ usbip port
Port 08: <Port in Use> at Super Speed(5000Mbps)
8-1 -> usbip://10.20.12.170:3240/2-2
VHCI currently exposes the imported device as SuperSpeed, so the
client reports 5000 Mbps instead of 10000 Mbps. This is a separate
speed-reporting limitation and does not prevent attachment or I/O.
Signed-off-by: Xu Rao <raoxu@uniontech.com>
---
tools/usb/usbip/libsrc/usbip_common.c | 2 ++
tools/usb/usbip/libsrc/vhci_driver.c | 1 +
2 files changed, 3 insertions(+)
diff --git a/tools/usb/usbip/libsrc/usbip_common.c b/tools/usb/usbip/libsrc/usbip_common.c
index b8d7d480595a..d91872a425f5 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", "SuperSpeed Plus" },
+ { USB_SPEED_SUPER_PLUS, "20000", "SuperSpeed Plus" },
{ 0, NULL, NULL }
};
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.50.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] usbip: tools: support SuperSpeed Plus devices
2026-06-22 10:08 [PATCH] usbip: tools: support SuperSpeed Plus devices raoxu
@ 2026-06-22 19:20 ` Shuah Khan
2026-06-23 3:00 ` raoxu
2026-06-25 15:09 ` Greg KH
1 sibling, 1 reply; 5+ messages in thread
From: Shuah Khan @ 2026-06-22 19:20 UTC (permalink / raw)
To: raoxu, valentina.manea.m; +Cc: shuah, i, linux-usb, linux-kernel
On 6/22/26 04:08, raoxu wrote:
> From: Xu Rao <raoxu@uniontech.com>
>
> USB/IP reads a remote device's speed from the server-side sysfs
> "speed" attribute. read_attr_speed() converts the string to
> enum usb_device_speed before the value is sent to the client.
>
> The conversion table only recognizes 5000 Mbps. Devices reporting
> 10000 or 20000 Mbps are therefore sent as USB_SPEED_UNKNOWN. The
> client then selects a USB 2.0 VHCI port, and the kernel rejects the
> attach request because USB_SPEED_UNKNOWN is not a supported speed.
>
> Map both SuperSpeed Plus sysfs values to USB_SPEED_SUPER_PLUS and
> select the SuperSpeed VHCI hub for that speed.
>
> The issue was reproduced with the following server hardware:
>
> xHCI controller: Intel 8086:a0ed, revision 20
> Subsystem: Lenovo 17aa:382a
> USB device: Silicon Motion 090c:2320 mass storage
> sysfs speed: 10000 Mbps
>
> Before the change:
>
> $ usbip attach -r 10.20.12.170 -b 2-2
> usbip: error: import device
>
> After the change, the device attaches and uses usb-storage:
>
> $ usbip port
> Port 08: <Port in Use> at Super Speed(5000Mbps)
> 8-1 -> usbip://10.20.12.170:3240/2-2
>
> VHCI currently exposes the imported device as SuperSpeed, so the
> client reports 5000 Mbps instead of 10000 Mbps. This is a separate
> speed-reporting limitation and does not prevent attachment or I/O.
>
> Signed-off-by: Xu Rao <raoxu@uniontech.com>
> ---
> tools/usb/usbip/libsrc/usbip_common.c | 2 ++
> tools/usb/usbip/libsrc/vhci_driver.c | 1 +
> 2 files changed, 3 insertions(+)
>
> diff --git a/tools/usb/usbip/libsrc/usbip_common.c b/tools/usb/usbip/libsrc/usbip_common.c
> index b8d7d480595a..d91872a425f5 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", "SuperSpeed Plus" },
> + { USB_SPEED_SUPER_PLUS, "20000", "SuperSpeed Plus" },
These are duplicate strings? Shouldn't they
be unique?
> { 0, NULL, NULL }
> };
>
> 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)
Won't this continue when hub == USB_SPEED_SUPER_PLUS?
Doesn't look right to me.
> continue;
> break;
> --
> 2.50.1
>
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] usbip: tools: support SuperSpeed Plus devices
2026-06-22 19:20 ` Shuah Khan
@ 2026-06-23 3:00 ` raoxu
0 siblings, 0 replies; 5+ messages in thread
From: raoxu @ 2026-06-23 3:00 UTC (permalink / raw)
To: skhan; +Cc: i, linux-kernel, linux-usb, raoxu, shuah, valentina.manea.m
Hi Shuah,
Thanks for reviewing.
On Mon, Jun 22, 2026 at 01:20:16PM -0600, Shuah Khan wrote:
> > + { USB_SPEED_SUPER_PLUS, "10000", "SuperSpeed Plus" },
> > + { USB_SPEED_SUPER_PLUS, "20000", "SuperSpeed Plus" },
>
> These are duplicate strings? Shouldn't they
> be unique?
The sysfs strings are unique: "10000" and "20000". They map to the
same USB_SPEED_SUPER_PLUS enum because enum usb_device_speed does not
distinguish the SuperSpeed Plus link rates.
> > + case USB_SPEED_SUPER_PLUS:
> > if (vhci_driver->idev[i].hub != HUB_SPEED_SUPER)
>
> Won't this continue when hub == USB_SPEED_SUPER_PLUS?
> Doesn't look right to me.
idev[i].hub is enum hub_speed, not enum usb_device_speed. enum
hub_speed identifies the two VHCI root-hub groups:
HUB_SPEED_HIGH
HUB_SPEED_SUPER
There is no HUB_SPEED_SUPER_PLUS value or separate SuperSpeed Plus
root-hub group. Both USB_SPEED_SUPER and USB_SPEED_SUPER_PLUS devices
use the existing USB 3.x VHCI root hub, represented by
HUB_SPEED_SUPER.
Therefore, when speed is USB_SPEED_SUPER_PLUS, a port with
idev[i].hub == HUB_SPEED_SUPER is the expected match and the code does
not continue.
Thanks,
Xu Rao
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] usbip: tools: support SuperSpeed Plus devices
2026-06-22 10:08 [PATCH] usbip: tools: support SuperSpeed Plus devices raoxu
2026-06-22 19:20 ` Shuah Khan
@ 2026-06-25 15:09 ` Greg KH
2026-06-25 15:37 ` Shuah Khan
1 sibling, 1 reply; 5+ messages in thread
From: Greg KH @ 2026-06-25 15:09 UTC (permalink / raw)
To: raoxu; +Cc: valentina.manea.m, shuah, i, linux-usb, linux-kernel
On Mon, Jun 22, 2026 at 06:08:02PM +0800, raoxu wrote:
> From: Xu Rao <raoxu@uniontech.com>
>
> USB/IP reads a remote device's speed from the server-side sysfs
> "speed" attribute. read_attr_speed() converts the string to
> enum usb_device_speed before the value is sent to the client.
>
> The conversion table only recognizes 5000 Mbps. Devices reporting
> 10000 or 20000 Mbps are therefore sent as USB_SPEED_UNKNOWN. The
> client then selects a USB 2.0 VHCI port, and the kernel rejects the
> attach request because USB_SPEED_UNKNOWN is not a supported speed.
>
> Map both SuperSpeed Plus sysfs values to USB_SPEED_SUPER_PLUS and
> select the SuperSpeed VHCI hub for that speed.
>
> The issue was reproduced with the following server hardware:
>
> xHCI controller: Intel 8086:a0ed, revision 20
> Subsystem: Lenovo 17aa:382a
> USB device: Silicon Motion 090c:2320 mass storage
> sysfs speed: 10000 Mbps
>
> Before the change:
>
> $ usbip attach -r 10.20.12.170 -b 2-2
> usbip: error: import device
>
> After the change, the device attaches and uses usb-storage:
>
> $ usbip port
> Port 08: <Port in Use> at Super Speed(5000Mbps)
> 8-1 -> usbip://10.20.12.170:3240/2-2
>
> VHCI currently exposes the imported device as SuperSpeed, so the
> client reports 5000 Mbps instead of 10000 Mbps. This is a separate
> speed-reporting limitation and does not prevent attachment or I/O.
>
> Signed-off-by: Xu Rao <raoxu@uniontech.com>
> ---
> tools/usb/usbip/libsrc/usbip_common.c | 2 ++
> tools/usb/usbip/libsrc/vhci_driver.c | 1 +
> 2 files changed, 3 insertions(+)
Isn't this covered by this change:
https://lore.kernel.org/r/00C828F338E43447+20260617020613.199086-1-chenyichong@uniontech.com
?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] usbip: tools: support SuperSpeed Plus devices
2026-06-25 15:09 ` Greg KH
@ 2026-06-25 15:37 ` Shuah Khan
0 siblings, 0 replies; 5+ messages in thread
From: Shuah Khan @ 2026-06-25 15:37 UTC (permalink / raw)
To: Greg KH, raoxu
Cc: valentina.manea.m, shuah, i, linux-usb, linux-kernel, Shuah Khan
On 6/25/26 09:09, Greg KH wrote:
> On Mon, Jun 22, 2026 at 06:08:02PM +0800, raoxu wrote:
>> From: Xu Rao <raoxu@uniontech.com>
>>
>> USB/IP reads a remote device's speed from the server-side sysfs
>> "speed" attribute. read_attr_speed() converts the string to
>> enum usb_device_speed before the value is sent to the client.
>>
>> The conversion table only recognizes 5000 Mbps. Devices reporting
>> 10000 or 20000 Mbps are therefore sent as USB_SPEED_UNKNOWN. The
>> client then selects a USB 2.0 VHCI port, and the kernel rejects the
>> attach request because USB_SPEED_UNKNOWN is not a supported speed.
>>
>> Map both SuperSpeed Plus sysfs values to USB_SPEED_SUPER_PLUS and
>> select the SuperSpeed VHCI hub for that speed.
>>
>> The issue was reproduced with the following server hardware:
>>
>> xHCI controller: Intel 8086:a0ed, revision 20
>> Subsystem: Lenovo 17aa:382a
>> USB device: Silicon Motion 090c:2320 mass storage
>> sysfs speed: 10000 Mbps
>>
>> Before the change:
>>
>> $ usbip attach -r 10.20.12.170 -b 2-2
>> usbip: error: import device
>>
>> After the change, the device attaches and uses usb-storage:
>>
>> $ usbip port
>> Port 08: <Port in Use> at Super Speed(5000Mbps)
>> 8-1 -> usbip://10.20.12.170:3240/2-2
>>
>> VHCI currently exposes the imported device as SuperSpeed, so the
>> client reports 5000 Mbps instead of 10000 Mbps. This is a separate
>> speed-reporting limitation and does not prevent attachment or I/O.
>>
>> Signed-off-by: Xu Rao <raoxu@uniontech.com>
>> ---
>> tools/usb/usbip/libsrc/usbip_common.c | 2 ++
>> tools/usb/usbip/libsrc/vhci_driver.c | 1 +
>> 2 files changed, 3 insertions(+)
>
> Isn't this covered by this change:
> https://lore.kernel.org/r/00C828F338E43447+20260617020613.199086-1-chenyichong@uniontech.com
>
This one was sent first. They look identical. I will go review
that now.
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-06-25 15:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-22 10:08 [PATCH] usbip: tools: support SuperSpeed Plus devices raoxu
2026-06-22 19:20 ` Shuah Khan
2026-06-23 3:00 ` raoxu
2026-06-25 15:09 ` Greg KH
2026-06-25 15:37 ` Shuah Khan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.