From nobody Thu Oct 2 07:45:09 2025 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0EBF51B041A; Sun, 21 Sep 2025 16:05:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758470735; cv=none; b=sMJ5+l+ObekS7DQf3rJhd57ggF2f2pCcv/mJwxxCz4iGQni68OI+d0Euf5fLiG7X8VBTvzZVa5BQ9BrQTU4foXu70zJkQ42j85TENP4teV1t0jiEBEYtptWubqlIbxmV8dOsHoLIJhoQ7HqWFF5z3i47D6nJEEMk2SmSU23PiTM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758470735; c=relaxed/simple; bh=lAXj+kQAqRyD+DJrXVR3V2Vb0NYk9/04bV+tN8UzS60=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=U9Wha9/z1xKTJBndTPcXVkx74+3vGGBRGORyVwT8wbud9c/QIuPJzJJmgwwy98QEgZ3/i5iQUix5NWEfRNmdynqtvYDCB9qWIN2YF4iAZkEjiY+q/7HcySxwaQUvonkKePDKk06D5iNif7Ug6Hi1VhgxaOEYIwmC0/f1PebxqH0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=IkzMk4KM; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="IkzMk4KM" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id AFCCC1A053F; Sun, 21 Sep 2025 16:05:32 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 840FB60634; Sun, 21 Sep 2025 16:05:32 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 7ED1C102F17C0; Sun, 21 Sep 2025 18:05:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1758470731; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=iGVz7DuFOoQH1KnQifyn8RVtrtTBEG9xYaPV+dI/CCw=; b=IkzMk4KMQEEN4Z0Zlrk2jFJQ/VoKsnjnlQv0q6hx6KDmetomf2vjEXqQQQn0ZLwKbZW26p Qr7MAI38OiOh/gVtIr0wk/9RSBThBKX9M0aFoUnN676f1SbwejzX4UB25uuec6kBKIou/J /J7aTeK7tEIfbjPh2f2ucM3vICVCyeeImClwo6y0WlWfCP5eHEYKiuvEugWNplAgn6COB+ ni1g+Eo0vrkadiEkvLmEAiqEROajr5FFhYiHp7RCCxY8Nxsc/16qrs/b/WuAEQOvU0n3Wk lnmWXUzl2+Fy+nnTmrllKvz8tyJxs70RuwVN0Hvxh2hl2+Bohvnr8wztVL4yUA== From: Maxime Chevallier To: davem@davemloft.net Cc: Maxime Chevallier , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, thomas.petazzoni@bootlin.com, Andrew Lunn , Jakub Kicinski , Eric Dumazet , Paolo Abeni , Russell King , linux-arm-kernel@lists.infradead.org, Christophe Leroy , Herve Codina , Florian Fainelli , Heiner Kallweit , Vladimir Oltean , =?UTF-8?q?K=C3=B6ry=20Maincent?= , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Oleksij Rempel , =?UTF-8?q?Nicol=C3=B2=20Veronese?= , Simon Horman , mwojtas@chromium.org, Antoine Tenart , devicetree@vger.kernel.org, Conor Dooley , Krzysztof Kozlowski , Rob Herring , Romain Gantois , Daniel Golle , Dimitri Fedrau , Florian Fainelli Subject: [PATCH net-next v13 02/18] net: ethtool: common: Indicate that BaseT works on up to 4 lanes Date: Sun, 21 Sep 2025 21:34:00 +0530 Message-ID: <20250921160419.333427-3-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250921160419.333427-1-maxime.chevallier@bootlin.com> References: <20250921160419.333427-1-maxime.chevallier@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" The way BaseT modes (Ethernet over twisted copper pairs) are represented in the kernel are through the following modes : ETHTOOL_LINK_MODE_10baseT_Half ETHTOOL_LINK_MODE_10baseT_Full ETHTOOL_LINK_MODE_100baseT_Half ETHTOOL_LINK_MODE_100baseT_Full ETHTOOL_LINK_MODE_1000baseT_Half ETHTOOL_LINK_MODE_1000baseT_Full ETHTOOL_LINK_MODE_2500baseT_Full ETHTOOL_LINK_MODE_5000baseT_Full ETHTOOL_LINK_MODE_10000baseT_Full ETHTOOL_LINK_MODE_100baseT1_Full ETHTOOL_LINK_MODE_1000baseT1_Full ETHTOOL_LINK_MODE_10baseT1L_Full ETHTOOL_LINK_MODE_10baseT1S_Full ETHTOOL_LINK_MODE_10baseT1S_Half ETHTOOL_LINK_MODE_10baseT1S_P2MP_Half ETHTOOL_LINK_MODE_10baseT1BRR_Full The baseT1* modes explicitly specify that they work on a single, unshielded twister copper pair. However, the other modes do not state the number of pairs that are used to carry the link. 10 and 100BaseT use 2 twisted copper pairs, while 1GBaseT and higher use 4 pairs. although 10 and 100BaseT use 2 pairs, they can work on a Cat3/4/5+ cables that contain 4 pairs. Change the number of pairs associated to BaseT modes to indicate the allowable number of pairs for BaseT. Further commits will then refine the minimum number of pairs required for the linkmode to work. BaseT1 modes aren't affected by this commit. Reviewed-by: Kory Maincent Reviewed-by: Christophe Leroy Tested-by: Oleksij Rempel Tested-by: Florian Fainelli Tested-by: Christophe Leroy Signed-off-by: Maxime Chevallier --- net/ethtool/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ethtool/common.c b/net/ethtool/common.c index 55223ebc2a7e..82d3df02164f 100644 --- a/net/ethtool/common.c +++ b/net/ethtool/common.c @@ -267,7 +267,7 @@ static_assert(ARRAY_SIZE(link_mode_names) =3D=3D __ETHT= OOL_LINK_MODE_MASK_NBITS); #define __LINK_MODE_LANES_LR8_ER8_FR8 8 #define __LINK_MODE_LANES_LRM 1 #define __LINK_MODE_LANES_MLD2 2 -#define __LINK_MODE_LANES_T 1 +#define __LINK_MODE_LANES_T 4 #define __LINK_MODE_LANES_T1 1 #define __LINK_MODE_LANES_X 1 #define __LINK_MODE_LANES_FX 1 --=20 2.49.0