From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm2-f13.google.com (mail-wm2-f13.google.com [74.125.225.141]) (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 0700A48CD54 for ; Fri, 25 Sep 2026 10:19:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.225.141 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790331550; cv=none; b=nRaesnLJXDWrJvECR4R0yM7hFfnkglNQqkP5446quXolszTePBAvTScE+xfh08MZvd/yvYuI7KPFQnUfdNtbxAHvSS2noseUE/+ZxF3aDD1Z8C+eSgRIP5cu8X1ki2GiV9X0pGaJTJlyEbNaHIkvJF3G5qL3kVx+6+Kznl26Udk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790331550; c=relaxed/simple; bh=Vy0BEaJXI/sgJiHnpzCCPocdjuq8/DGs5MXWEPWVMLo=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=LbfpO1J9C/R/2FnlvstTzpZoKTyCf0NHIE8vnk1sN1XM63rnc0Jo6rkCSzxqRdw9UGYkpe28WkTu7/phnG3w5yVwITu6H8YYXq+Rzl8ozb73fJ+F8mYPKYNeK04qfrXyNWmdTQdo25q+yDBA0jn/DRVQZb84AUE5SNlJjMVgMAs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=l+ChUMlF; arc=none smtp.client-ip=74.125.225.141 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="l+ChUMlF" Received: by mail-wm2-f13.google.com with SMTP id 5b1f17b1804b1-49e6b885ef8so4512075e9.1 for ; Fri, 25 Sep 2026 03:19:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1790331547; x=1790936347; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=uzt8qnaNUNgPrBzOLY5U/g5H8B5eMSOss0W//LWBCGk=; b=l+ChUMlF+DbiAK5Nl2eXQbTxXMNm1SZwCWM5/eF/ZoKOoE4qM/S2J6gCDKmOuMesF4 W2W0HcTpXxq+t2aJ3a0wRVA11VTmh573Nvv6rmL2XHHTaEAQJeQqy93WrzBGtSacWxbj nm7lylCNFEW81fAfI1Q5lGtPX9+Shbh2ZQFELkvvwRUOJ2yLv5x3VF/gIgmFf048yyov 5NjVMuP1pOSbm7HqPJNDp0qPWClTWOKA/iTu/hlFlJhBUAW9X1NWmKqC/4X4nTUl39WR r04fKu+Z80ReW6SS7zNZZ0FDP6rHFgrcdzpzM1IwoxID7i7L9ECvzUb6msU72KcxMBTF 5XRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790331547; x=1790936347; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=uzt8qnaNUNgPrBzOLY5U/g5H8B5eMSOss0W//LWBCGk=; b=J5kEUtRROtyanLtZTA+gRP5tWIu0ymgErF59jZlorOd1hAbAaAV5v/S6nPoGh2lmTE Hj7gLQtE85osp7Mtdyb2nZZSDNfCZJo6htQJlW0ITgYGo1UHTMn5WCyp9P6vD7miyTqj W/PC8s2SuAOeQopHw7csoEEFQyN8RAnEe1tzp0eu/lY7BvlZg3yrVS7XsshhpuxIqMbY fUGS7MT3Ar+Z/k6qq5nmi3m+f1lG64PK+7HxZsxoEXYXLr3QfAaifgys8LL1ZwUZ0FAR +4QpDnpeJuTaaaxr3IUNTH4e0kyPrVvfm/oaqcwQotJ4Rlrf6PCfputEQBYZYHA8fH2a Nm9g== X-Forwarded-Encrypted: i=1; AKwUvByxVud3spbCmxHQJlo6BYfOZgjVi09BQ88rJtQOke+5fgOpxHbuEuuHv82gaUEQQ17PEcHDO5k5Qbo=@vger.kernel.org X-Gm-Message-State: AFuF++kF4c2LMZGpLSXqx0V8gn8QUgH46UoI/hGeNF63S0MKXD9t9IBU fkfGWrwbgakrB9uiYWgQ/f5uf1RUqOP+vRGfa01+8qYjA6wgSq1dGllx X-Gm-Gg: AYBFou31Oxka3722nVkMc+sd8+6goJrbLFMu1z9Az21RgQbSHEPPMYX6kuAK5gXjfIz tpVH9dwAB2H04y8Pn+r6og/FslBe10/jtPslS4iGpPblEXetQ3z2OUFS2VZC9OEmERhqcJtY10Y bvJSCR5JcEk23TSx5M75pkC7p2YYE7m0HHNtj3jE51qiRharnabs7M6X7CJfTu/oTdznJkDgoms X9AEOeCOQQozE+it+KkbTaxhSr3lIUWIzA6uoSdFJMDrdWkDrAoBgHvjVY4npFua4cY2LDwsw+V x1WaOBvQ8jSnvmGejvzg5KK46U4AIQPL+9AgMu/oDlAF+NhAVXcjKQTDfNrPp+9Oxf/wmfh0ost bbM7bnpcBb2xoeullawrjks8wYuKkJyfNbwGwXrXzHQqjUcJWq91qqUG7ZxdxayoLvOCUZ9rPyB aKg3Bv1pkHh9IAKgeAsEudAQzynp6IkXlMpdruXevcqciruUHAJ8TJ2lzFM8hZeiYMiwWkKkgBQ uW+N2nqtbqAgrsO5i7J/A== X-Received: by 2002:a05:600c:3b84:b0:49f:f099:6f98 with SMTP id 5b1f17b1804b1-49ff09970dcmr34896555e9.20.1790331546908; Fri, 25 Sep 2026 03:19:06 -0700 (PDT) Received: from foxbook (bez152.neoplus.adsl.tpnet.pl. [83.28.37.152]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49ff044406dsm56519475e9.1.2026.09.25.03.19.05 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 25 Sep 2026 03:19:06 -0700 (PDT) Date: Fri, 25 Sep 2026 12:19:02 +0200 From: Michal Pecio To: Kean Ren Cc: Thinh Nguyen , Greg Kroah-Hartman , Mathias Nyman , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Alan Stern , Griffin Kroah-Hartman , Kuen-Han Tsai , Kees Cook , Nikhil Solanke , Thorsten Blum Subject: Re: [PATCH 1/2] usb: core: hub: recognise two-lane SuperSpeed sublinks as Gen 1x2 Message-ID: <20260925121902.3d75df9b.michal.pecio@gmail.com> In-Reply-To: References: <20260920025308.2358862-1-rh_king@163.com> <20260920025308.2358862-2-rh_king@163.com> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 24 Sep 2026 02:06:12 +0000, Thinh Nguyen wrote: > On Sun, Sep 20, 2026, Kean Ren wrote: > > get_port_ssp_rate() rejects every matching sublink speed attribute > > whose link protocol (LP) is not SuperSpeedPlus by jumping to the > > "unknown" exit before it looks at the number of active lanes. > > > > USB 3.2 Gen 1x2 runs two SuperSpeed (Gen 1) lanes, so the matching > > Gen 1x2 is SuperSpeed Plus and should use LP = SSP > > > sublink entry advertises LP = SuperSpeed while two lanes are in use. > > The current code therefore returns USB_SSP_GEN_UNKNOWN for such a > > link and the USB core falls back to USB_SPEED_SUPER, reporting 5000 > > Mbps. > > > > Handle the two-lane cases before rejecting non-SuperSpeedPlus > > entries: > > >= 10 Gbps per lane and 2 lanes -> USB_SSP_GEN_2x2 > > >= 5 Gbps per lane and 2 lanes -> USB_SSP_GEN_1x2 > > > > so that a genuine Gen 1x2 link is reported as 10000 Mbps instead of > > 5000 Mbps. Was it tested with a genuine Gen 1x2 device? On which hub? > > > > Signed-off-by: Kean Ren > > > Gen 1x2 is a SuperSpeed Plus mode and should advertise LP = > USB_SSP_SUBLINK_SPEED_LP_SSP. A controller reporting Gen 1x2 with LP = > SuperSpeed is violating the expected encoding. This deals with the bmSublinkSpeedAttr array of hub BOS descriptor. For host controller root hubs it's generated by xhci-hub.c. And I think that the code which generates it already tries to avoid setting SS (non-P) in multi-lane speeds, so what triggers this bug? Regards, Michal