[PATCH net-next v7 02/15] net: ethtool: common: Indicate that BaseT works on up to 4 lanes
From: Maxime Chevallier
Date: Mon Jun 30 2025 - 10:34:56 EST
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.
Signed-off-by: Maxime Chevallier <maxime.chevallier@xxxxxxxxxxx>
---
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 eb253e0fd61b..bc1b625c9ff4 100644
--- a/net/ethtool/common.c
+++ b/net/ethtool/common.c
@@ -267,7 +267,7 @@ static_assert(ARRAY_SIZE(link_mode_names) == __ETHTOOL_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
--
2.49.0