From: "Russell King (Oracle)" <rmk+kernel@armlinux•org.uk>
To: "David S. Miller" <davem@davemloft•net>,
Jakub Kicinski <kuba@kernel•org>
Cc: Andrew Lunn <andrew@lunn•ch>,
Heiner Kallweit <hkallweit1@gmail•com>,
netdev@vger•kernel.org
Subject: [PATCH net-next 2/2] net: sfp: move field definitions along side register index
Date: Thu, 27 Oct 2022 14:21:21 +0100 [thread overview]
Message-ID: <E1oo2oz-00HFJm-AF@rmk-PC.armlinux.org.uk> (raw)
In-Reply-To: <Y1qFvaDlLVM1fHdG@shell.armlinux.org.uk>
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@armlinux•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
next prev parent reply other threads:[~2022-10-27 13:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-27 13:21 [PATCH net-next 0/2] Clean up SFP register definitions Russell King (Oracle)
2022-10-27 13:21 ` [PATCH net-next 1/2] net: sfp: convert register indexes from hex to decimal Russell King (Oracle)
2022-10-27 14:43 ` Andrew Lunn
2022-10-27 14:46 ` Russell King (Oracle)
2022-10-27 13:21 ` Russell King (Oracle) [this message]
2022-10-27 14:43 ` [PATCH net-next 2/2] net: sfp: move field definitions along side register index Andrew Lunn
2022-10-29 5:10 ` [PATCH net-next 0/2] Clean up SFP register definitions patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1oo2oz-00HFJm-AF@rmk-PC.armlinux.org.uk \
--to=rmk+kernel@armlinux$(echo .)org.uk \
--cc=andrew@lunn$(echo .)ch \
--cc=davem@davemloft$(echo .)net \
--cc=hkallweit1@gmail$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox