Blame SOURCES/0015-update-link-mode-tables.patch

83ef35
From aefd1fcb99c1d64198f315a20e087888d7715632 Mon Sep 17 00:00:00 2001
83ef35
From: Michal Kubecek <mkubecek@suse.cz>
83ef35
Date: Wed, 16 Sep 2020 23:12:18 +0200
83ef35
Subject: [PATCH 15/17] update link mode tables
83ef35
83ef35
Update tables of link modes to cover all modes currently defined in uapi
83ef35
header:
83ef35
83ef35
  - link_modes[] array in netlink/settings.c
83ef35
  - all_advertised_modes_bits[] array in ethtool.c
83ef35
  - table of modes and corresponding bit values in manual page
83ef35
83ef35
In the manual page table, fix also whitespace and order inconsistencies.
83ef35
83ef35
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
83ef35
(cherry picked from commit 63130d0b00040136629988a1170da93ae742ca51)
83ef35
---
83ef35
 ethtool.8.in       | 32 ++++++++++++++++++++++++++------
83ef35
 ethtool.c          | 24 ++++++++++++++++++++++--
83ef35
 netlink/settings.c | 15 +++++++++++++++
83ef35
 3 files changed, 63 insertions(+), 8 deletions(-)
83ef35
83ef35
diff --git a/ethtool.8.in b/ethtool.8.in
83ef35
index a50a4769895c..12866dc456cf 100644
83ef35
--- a/ethtool.8.in
83ef35
+++ b/ethtool.8.in
83ef35
@@ -721,21 +721,21 @@ lB	l	lB.
83ef35
 0x80000000000000000	100baseT1 Full
83ef35
 0x010	1000baseT Half	(not supported by IEEE standards)
83ef35
 0x020	1000baseT Full
83ef35
-0x100000000000000000	1000baseT1 Full
83ef35
 0x20000	1000baseKX Full
83ef35
 0x20000000000	1000baseX Full
83ef35
-0x800000000000	2500baseT Full
83ef35
+0x100000000000000000	1000baseT1 Full
83ef35
 0x8000	2500baseX Full	(not supported by IEEE standards)
83ef35
+0x800000000000	2500baseT Full
83ef35
 0x1000000000000	5000baseT Full
83ef35
 0x1000	10000baseT Full
83ef35
 0x40000	10000baseKX4 Full
83ef35
 0x80000	10000baseKR Full
83ef35
 0x100000	10000baseR_FEC
83ef35
-0x40000000000	10000baseCR  Full
83ef35
-0x80000000000	10000baseSR  Full
83ef35
-0x100000000000	10000baseLR  Full
83ef35
+0x40000000000	10000baseCR Full
83ef35
+0x80000000000	10000baseSR Full
83ef35
+0x100000000000	10000baseLR Full
83ef35
 0x200000000000	10000baseLRM Full
83ef35
-0x400000000000	10000baseER  Full
83ef35
+0x400000000000	10000baseER Full
83ef35
 0x200000	20000baseMLD2 Full	(not supported by IEEE standards)
83ef35
 0x400000	20000baseKR2 Full	(not supported by IEEE standards)
83ef35
 0x80000000	25000baseCR Full
83ef35
@@ -766,11 +766,31 @@ lB	l	lB.
83ef35
 0x800000000000000	100000baseCR2 Full
83ef35
 0x1000000000000000	100000baseLR2_ER2_FR2 Full
83ef35
 0x2000000000000000	100000baseDR2 Full
83ef35
+0x8000000000000000000	100000baseKR Full
83ef35
+0x10000000000000000000	100000baseSR Full
83ef35
+0x20000000000000000000	100000baseLR_ER_FR Full
83ef35
+0x40000000000000000000	100000baseCR Full
83ef35
+0x80000000000000000000	100000baseDR Full
83ef35
 0x4000000000000000	200000baseKR4 Full
83ef35
 0x8000000000000000	200000baseSR4 Full
83ef35
 0x10000000000000000	200000baseLR4_ER4_FR4 Full
83ef35
 0x20000000000000000	200000baseDR4 Full
83ef35
 0x40000000000000000	200000baseCR4 Full
83ef35
+0x100000000000000000000	200000baseKR2 Full
83ef35
+0x200000000000000000000	200000baseSR2 Full
83ef35
+0x400000000000000000000	200000baseLR2_ER2_FR2 Full
83ef35
+0x800000000000000000000	200000baseDR2 Full
83ef35
+0x1000000000000000000000	200000baseCR2 Full
83ef35
+0x200000000000000000	400000baseKR8 Full
83ef35
+0x400000000000000000	400000baseSR8 Full
83ef35
+0x800000000000000000	400000baseLR8_ER8_FR8 Full
83ef35
+0x1000000000000000000	400000baseDR8 Full
83ef35
+0x2000000000000000000	400000baseCR8 Full
83ef35
+0x2000000000000000000000	400000baseKR4 Full
83ef35
+0x4000000000000000000000	400000baseSR4 Full
83ef35
+0x8000000000000000000000	400000baseLR4_ER4_FR4 Full
83ef35
+0x10000000000000000000000	400000baseDR4 Full
83ef35
+0x20000000000000000000000	400000baseCR4 Full
83ef35
 .TE
83ef35
 .TP
83ef35
 .BI phyad \ N
83ef35
diff --git a/ethtool.c b/ethtool.c
83ef35
index 606af3e6b48f..2e24e98187d2 100644
83ef35
--- a/ethtool.c
83ef35
+++ b/ethtool.c
83ef35
@@ -392,9 +392,9 @@ static void init_global_link_mode_masks(void)
83ef35
 		ETHTOOL_LINK_MODE_100baseT_Full_BIT,
83ef35
 		ETHTOOL_LINK_MODE_1000baseT_Half_BIT,
83ef35
 		ETHTOOL_LINK_MODE_1000baseT_Full_BIT,
83ef35
-		ETHTOOL_LINK_MODE_1000baseKX_Full_BIT,
83ef35
-		ETHTOOL_LINK_MODE_2500baseX_Full_BIT,
83ef35
 		ETHTOOL_LINK_MODE_10000baseT_Full_BIT,
83ef35
+		ETHTOOL_LINK_MODE_2500baseX_Full_BIT,
83ef35
+		ETHTOOL_LINK_MODE_1000baseKX_Full_BIT,
83ef35
 		ETHTOOL_LINK_MODE_10000baseKX4_Full_BIT,
83ef35
 		ETHTOOL_LINK_MODE_10000baseKR_Full_BIT,
83ef35
 		ETHTOOL_LINK_MODE_10000baseR_FEC_BIT,
83ef35
@@ -443,6 +443,26 @@ static void init_global_link_mode_masks(void)
83ef35
 		ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT,
83ef35
 		ETHTOOL_LINK_MODE_100baseT1_Full_BIT,
83ef35
 		ETHTOOL_LINK_MODE_1000baseT1_Full_BIT,
83ef35
+		ETHTOOL_LINK_MODE_400000baseKR8_Full_BIT,
83ef35
+		ETHTOOL_LINK_MODE_400000baseSR8_Full_BIT,
83ef35
+		ETHTOOL_LINK_MODE_400000baseLR8_ER8_FR8_Full_BIT,
83ef35
+		ETHTOOL_LINK_MODE_400000baseDR8_Full_BIT,
83ef35
+		ETHTOOL_LINK_MODE_400000baseCR8_Full_BIT,
83ef35
+		ETHTOOL_LINK_MODE_100000baseKR_Full_BIT,
83ef35
+		ETHTOOL_LINK_MODE_100000baseSR_Full_BIT,
83ef35
+		ETHTOOL_LINK_MODE_100000baseLR_ER_FR_Full_BIT,
83ef35
+		ETHTOOL_LINK_MODE_100000baseCR_Full_BIT,
83ef35
+		ETHTOOL_LINK_MODE_100000baseDR_Full_BIT,
83ef35
+		ETHTOOL_LINK_MODE_200000baseKR2_Full_BIT,
83ef35
+		ETHTOOL_LINK_MODE_200000baseSR2_Full_BIT,
83ef35
+		ETHTOOL_LINK_MODE_200000baseLR2_ER2_FR2_Full_BIT,
83ef35
+		ETHTOOL_LINK_MODE_200000baseDR2_Full_BIT,
83ef35
+		ETHTOOL_LINK_MODE_200000baseCR2_Full_BIT,
83ef35
+		ETHTOOL_LINK_MODE_400000baseKR4_Full_BIT,
83ef35
+		ETHTOOL_LINK_MODE_400000baseSR4_Full_BIT,
83ef35
+		ETHTOOL_LINK_MODE_400000baseLR4_ER4_FR4_Full_BIT,
83ef35
+		ETHTOOL_LINK_MODE_400000baseDR4_Full_BIT,
83ef35
+		ETHTOOL_LINK_MODE_400000baseCR4_Full_BIT,
83ef35
 	};
83ef35
 	static const enum ethtool_link_mode_bit_indices
83ef35
 		additional_advertised_flags_bits[] = {
83ef35
diff --git a/netlink/settings.c b/netlink/settings.c
83ef35
index d1da995b434c..3a9518a7e12b 100644
83ef35
--- a/netlink/settings.c
83ef35
+++ b/netlink/settings.c
83ef35
@@ -147,6 +147,21 @@ static const struct link_mode_info link_modes[] = {
83ef35
 	[ETHTOOL_LINK_MODE_400000baseDR8_Full_BIT]	= __REAL(400000),
83ef35
 	[ETHTOOL_LINK_MODE_400000baseCR8_Full_BIT]	= __REAL(400000),
83ef35
 	[ETHTOOL_LINK_MODE_FEC_LLRS_BIT]		= __SPECIAL(FEC),
83ef35
+	[ETHTOOL_LINK_MODE_100000baseKR_Full_BIT]	= __REAL(100000),
83ef35
+	[ETHTOOL_LINK_MODE_100000baseSR_Full_BIT]	= __REAL(100000),
83ef35
+	[ETHTOOL_LINK_MODE_100000baseLR_ER_FR_Full_BIT]	= __REAL(100000),
83ef35
+	[ETHTOOL_LINK_MODE_100000baseCR_Full_BIT]	= __REAL(100000),
83ef35
+	[ETHTOOL_LINK_MODE_100000baseDR_Full_BIT]	= __REAL(100000),
83ef35
+	[ETHTOOL_LINK_MODE_200000baseKR2_Full_BIT]	= __REAL(200000),
83ef35
+	[ETHTOOL_LINK_MODE_200000baseSR2_Full_BIT]	= __REAL(200000),
83ef35
+	[ETHTOOL_LINK_MODE_200000baseLR2_ER2_FR2_Full_BIT] = __REAL(200000),
83ef35
+	[ETHTOOL_LINK_MODE_200000baseDR2_Full_BIT]	= __REAL(200000),
83ef35
+	[ETHTOOL_LINK_MODE_200000baseCR2_Full_BIT]	= __REAL(200000),
83ef35
+	[ETHTOOL_LINK_MODE_400000baseKR4_Full_BIT]	= __REAL(400000),
83ef35
+	[ETHTOOL_LINK_MODE_400000baseSR4_Full_BIT]	= __REAL(400000),
83ef35
+	[ETHTOOL_LINK_MODE_400000baseLR4_ER4_FR4_Full_BIT] = __REAL(400000),
83ef35
+	[ETHTOOL_LINK_MODE_400000baseDR4_Full_BIT]	= __REAL(400000),
83ef35
+	[ETHTOOL_LINK_MODE_400000baseCR4_Full_BIT]	= __REAL(400000),
83ef35
 };
83ef35
 const unsigned int link_modes_count = ARRAY_SIZE(link_modes);
83ef35
 
83ef35
-- 
83ef35
2.26.2
83ef35