From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f53.google.com (mail-ot1-f53.google.com [209.85.210.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7C35733CEA2 for ; Mon, 22 Jun 2026 19:20:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782156020; cv=none; b=AnV3HBC48fplnSQtsdJIQxH4r2rcIAK6ZyH+TmikTwmRLOYWq82i4LFppAhkSPzBts3EMkoodmMs2LxAZEUy+CB2HKpjTO0C6nZk7aUERaAYi5eX/S4bTKaQxo8wFF/3oe1/5YmMzA+zG8MMnVBSWoXm00e3GUVeAelLK/YbFLU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782156020; c=relaxed/simple; bh=j/h+URImDdxSyb0+bU+8F0V9rJuPI+Pnc3VjZ6LMoEY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=YYepe1It28ooZM04LxpFPUYDB8lQgIR2n7vN/esUmeYtqF2/1vjhidQ//Mu3X+oYcwa0yAlPZyHtLBVvpix7AblYB50ZIld0nDOk/bejFWtUFbNVpNhS719AG/E2gN4F9OdFKBeomuY/aG8xpP0nndNQD1nVU6vT5L88oZLCwEI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=F9Yqzx1e; arc=none smtp.client-ip=209.85.210.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="F9Yqzx1e" Received: by mail-ot1-f53.google.com with SMTP id 46e09a7af769-7e6fa36a1b6so3538075a34.1 for ; Mon, 22 Jun 2026 12:20:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1782156018; x=1782760818; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=DqKEqkgorRteBv1u8AcOLPP9p3Ks9lbIdi91P4utQN8=; b=F9Yqzx1eHDUCizjeNFE1t7u6ubgKrGBklA/Kqfg+XsLHJrdqq2c4hkde6+T+KaBh+o DX6Dr5enlNPU2LKz+3YVtuEVuTSuS3HX3/8lZs/qsEDHXvKg4cKJtS1gPbEirVzZF6rB oLrDHOnn3/OIGg1MmsPWg81IQ+sSZk0/cIEXY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782156018; x=1782760818; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DqKEqkgorRteBv1u8AcOLPP9p3Ks9lbIdi91P4utQN8=; b=qDRon2nee0w6Tx6wu0zuSl8462fVxC3AJOMSsgfyewU+9+7RFzpLKvQdcQzhYCHoid DMHPcnUWv/Uncd3p5Qc5mmaW82+mTddowRg31z/OZ3MXAiP2DfqOKFix3FejuYjuUmLd 786FPffBJKdcWK8r7g1CJ5Go9IYRXzZZ8zSvWJPmY7LeBrtHgZrG/VE9lV7UaO6Wvpix rwsev08W/09xcu//u5YYfjdcz3NYxsW+FeG4v6zRDR4XOK0hptMPadGnugaJngF3o35e 4ucJEKn1jDWv08vHdNu1d53uMs0EPIO1ewjHwCjaUzaBgcLBPOROyXJtmRvjkTvgPlb9 3xrQ== X-Forwarded-Encrypted: i=1; AFNElJ9YclsiYRexNNAWDGoDFUZuKpbgG+ZO6C9kC5TIsuzdzC4Ivzl4zGoFYqzh/KuSljoR+4U0j6Nt6Do3gCA=@vger.kernel.org X-Gm-Message-State: AOJu0Ywm7Yurz9RL1lsdwoq/UHhfKIku/pUpZsLBdK7yOmt+YarDVqTE gguNeW6LsohJTLsncQxUvxrpTBicnhDFtxGBfq1IaD6QgkgXW8B7SFYQyvKg+56wgbI= X-Gm-Gg: AfdE7ck0kO8kKgvUNhhkvRtqYD/9VFwPFJx/+XZ74GJDvc5gub8/Z+u7uFi3a1KoR1R H249QXiyxMcyXLxxPeijnR9YFRuk2LHTcdnCkLVCL1eFCWhl8s5KDTZqfMXbNyjW6/sHpIou2F5 Jc1CGxc1J6JpyYuqN7my6RLLVBkqw7NdooDNgIEC1Xz1m11STiRteAy3UD/t0dahPEIkHB2OalO yfXQ0vqRx0Zif2+N/39IUUXCMsuMS7S6ERlN8k2flwH3fKtrFA64lxdLJLQWP3D2jdnKDsSyX72 xsW4uB8ShwI/21VyPdDenFoaysunpVK7prwf2jzm8f6w9JrQuCNYvsBhbsmn0lCvlp4UsIQCMpZ 5jerYRD9p8vPfnUSlcbs6LVy3PTlN34G/PET1Qfp+psa9XjYi20iG3oLNlRwoCdWK+Q6R5tmqii 4vSBy+MwLizu2S4pe3udkc X-Received: by 2002:a05:6808:120b:b0:489:4d48:56e7 with SMTP id 5614622812f47-4896ac031e1mr14500472b6e.25.1782156018429; Mon, 22 Jun 2026 12:20:18 -0700 (PDT) Received: from [192.168.1.14] ([38.15.57.99]) by smtp.gmail.com with ESMTPSA id 5614622812f47-48aedf23f7bsm5336450b6e.11.2026.06.22.12.20.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Jun 2026 12:20:17 -0700 (PDT) Message-ID: Date: Mon, 22 Jun 2026 13:20:16 -0600 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] usbip: tools: support SuperSpeed Plus devices To: raoxu , valentina.manea.m@gmail.com Cc: shuah@kernel.org, i@zenithal.me, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org References: <1B3C4D10DA532DC9+20260622100802.377751-1-raoxu@uniontech.com> Content-Language: en-US From: Shuah Khan In-Reply-To: <1B3C4D10DA532DC9+20260622100802.377751-1-raoxu@uniontech.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 6/22/26 04:08, raoxu wrote: > From: Xu Rao > > 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: 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 > --- > 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