mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shuah Khan <skhan@linuxfoundation.org>
To: raoxu <raoxu@uniontech.com>, valentina.manea.m@gmail.com
Cc: shuah@kernel.org, i@zenithal.me, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usbip: tools: support SuperSpeed Plus devices
Date: Mon, 22 Jun 2026 13:20:16 -0600	[thread overview]
Message-ID: <d2c461a4-9271-43b5-9ba4-8c3c9c63c134@linuxfoundation.org> (raw)
In-Reply-To: <1B3C4D10DA532DC9+20260622100802.377751-1-raoxu@uniontech.com>

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

  reply	other threads:[~2026-06-22 19:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-22 10:08 raoxu
2026-06-22 19:20 ` Shuah Khan [this message]
2026-06-23  3:00   ` raoxu
2026-06-25 15:09 ` Greg KH
2026-06-25 15:37   ` Shuah Khan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d2c461a4-9271-43b5-9ba4-8c3c9c63c134@linuxfoundation.org \
    --to=skhan@linuxfoundation.org \
    --cc=i@zenithal.me \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=raoxu@uniontech.com \
    --cc=shuah@kernel.org \
    --cc=valentina.manea.m@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®