mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 02:17:36 -04:00
usbip: tools: support SuperSpeedPlus devices
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: b2316645ca ("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
735a461d06
commit
195e667c87
@@ -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 }
|
||||
};
|
||||
|
||||
|
||||
@@ -57,6 +57,10 @@ static struct {
|
||||
.speed = USB_SPEED_SUPER,
|
||||
.name = "super-speed",
|
||||
},
|
||||
{
|
||||
.speed = USB_SPEED_SUPER_PLUS,
|
||||
.name = "super-speed-plus",
|
||||
},
|
||||
};
|
||||
|
||||
static
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user