Re: [PATCH] usbip: tools: support SuperSpeed Plus devices
From: raoxu
Date: Mon Jun 22 2026 - 23:01:14 EST
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