[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <E1oo2oz-00HFJm-AF@rmk-PC.armlinux.org.uk>
Date: Thu, 27 Oct 2022 14:21:21 +0100
From: "Russell King (Oracle)" <rmk+kernel@...linux.org.uk>
To: "David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>
Cc: Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>, netdev@...r.kernel.org
Subject: [PATCH net-next 2/2] net: sfp: move field definitions along side
register index
Just as we do for the A2h enum, arrange the A0h enum to have the
field definitions next to their corresponding register index.
Signed-off-by: Russell King (Oracle) <rmk+kernel@...linux.org.uk>
---
include/linux/sfp.h | 27 +++++++++++++++++----------
1 file changed, 17 insertions(+), 10 deletions(-)
diff --git a/include/linux/sfp.h b/include/linux/sfp.h
index 4e2db155664d..52b98f9666a2 100644
--- a/include/linux/sfp.h
+++ b/include/linux/sfp.h
@@ -333,7 +333,10 @@ enum {
/* SFP EEPROM registers */
enum {
SFP_PHYS_ID = 0,
+
SFP_PHYS_EXT_ID = 1,
+ SFP_PHYS_EXT_ID_SFP = 0x04,
+
SFP_CONNECTOR = 2,
SFP_COMPLIANCE = 3,
SFP_ENCODING = 11,
@@ -354,17 +357,8 @@ enum {
SFP_OPTICAL_WAVELENGTH_LSB = 61,
SFP_CABLE_SPEC = 60,
SFP_CC_BASE = 63,
- SFP_OPTIONS = 64, /* 2 bytes, MSB, LSB */
- SFP_BR_MAX = 66,
- SFP_BR_MIN = 67,
- SFP_VENDOR_SN = 68,
- SFP_DATECODE = 84,
- SFP_DIAGMON = 92,
- SFP_ENHOPTS = 93,
- SFP_SFF8472_COMPLIANCE = 94,
- SFP_CC_EXT = 95,
- SFP_PHYS_EXT_ID_SFP = 0x04,
+ SFP_OPTIONS = 64, /* 2 bytes, MSB, LSB */
SFP_OPTIONS_HIGH_POWER_LEVEL = BIT(13),
SFP_OPTIONS_PAGING_A2 = BIT(12),
SFP_OPTIONS_RETIMER = BIT(11),
@@ -378,11 +372,20 @@ enum {
SFP_OPTIONS_TX_FAULT = BIT(3),
SFP_OPTIONS_LOS_INVERTED = BIT(2),
SFP_OPTIONS_LOS_NORMAL = BIT(1),
+
+ SFP_BR_MAX = 66,
+ SFP_BR_MIN = 67,
+ SFP_VENDOR_SN = 68,
+ SFP_DATECODE = 84,
+
+ SFP_DIAGMON = 92,
SFP_DIAGMON_DDM = BIT(6),
SFP_DIAGMON_INT_CAL = BIT(5),
SFP_DIAGMON_EXT_CAL = BIT(4),
SFP_DIAGMON_RXPWR_AVG = BIT(3),
SFP_DIAGMON_ADDRMODE = BIT(2),
+
+ SFP_ENHOPTS = 93,
SFP_ENHOPTS_ALARMWARN = BIT(7),
SFP_ENHOPTS_SOFT_TX_DISABLE = BIT(6),
SFP_ENHOPTS_SOFT_TX_FAULT = BIT(5),
@@ -390,6 +393,8 @@ enum {
SFP_ENHOPTS_SOFT_RATE_SELECT = BIT(3),
SFP_ENHOPTS_APP_SELECT_SFF8079 = BIT(2),
SFP_ENHOPTS_SOFT_RATE_SFF8431 = BIT(1),
+
+ SFP_SFF8472_COMPLIANCE = 94,
SFP_SFF8472_COMPLIANCE_NONE = 0x00,
SFP_SFF8472_COMPLIANCE_REV9_3 = 0x01,
SFP_SFF8472_COMPLIANCE_REV9_5 = 0x02,
@@ -399,6 +404,8 @@ enum {
SFP_SFF8472_COMPLIANCE_REV11_3 = 0x06,
SFP_SFF8472_COMPLIANCE_REV11_4 = 0x07,
SFP_SFF8472_COMPLIANCE_REV12_0 = 0x08,
+
+ SFP_CC_EXT = 95,
};
/* SFP Diagnostics */
--
2.30.2
Powered by blists - more mailing lists