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>,
Eric Dumazet <edumazet@google•com>,
Paolo Abeni <pabeni@redhat•com>,
netdev@vger•kernel.org
Subject: [PATCH net-next 4/7] net: sfp: ignore power level 3 prior to SFF-8472 Rev 11.4
Date: Wed, 19 Oct 2022 14:29:01 +0100 [thread overview]
Message-ID: <E1ol981-00EDSj-FZ@rmk-PC.armlinux.org.uk> (raw)
In-Reply-To: <Y0/7dAB8OU3jrbz6@shell.armlinux.org.uk>
Power level 3 was included in SFF-8472 revision 11.9, but this does
not have a compliance code. Use revision 11.4 as the minimum
compliance level instead.
This should avoid any spurious indication of 2W modules.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux•org.uk>
---
drivers/net/phy/sfp.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c
index a7635b02524a..af676e28ba6a 100644
--- a/drivers/net/phy/sfp.c
+++ b/drivers/net/phy/sfp.c
@@ -1764,7 +1764,9 @@ static int sfp_module_parse_power(struct sfp *sfp)
if (sfp->id.ext.sff8472_compliance >= SFP_SFF8472_COMPLIANCE_REV10_2 &&
sfp->id.ext.options & cpu_to_be16(SFP_OPTIONS_POWER_DECL))
power_mW = 1500;
- if (sfp->id.ext.options & cpu_to_be16(SFP_OPTIONS_HIGH_POWER_LEVEL))
+ /* Added in Rev 11.9, but there is no compliance code for this */
+ if (sfp->id.ext.sff8472_compliance >= SFP_SFF8472_COMPLIANCE_REV11_4 &&
+ sfp->id.ext.options & cpu_to_be16(SFP_OPTIONS_HIGH_POWER_LEVEL))
power_mW = 2000;
/* Power level 1 modules (max. 1W) are always supported. */
--
2.30.2
next prev parent reply other threads:[~2022-10-19 13:42 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-19 13:28 [PATCH net-next 0/7] net: sfp: improve high power module implementation Russell King (Oracle)
2022-10-19 13:28 ` [PATCH net-next 1/7] dt-bindings: net: sff,sfp: update binding Russell King (Oracle)
2022-10-19 23:31 ` Rob Herring
2022-10-20 8:28 ` Russell King (Oracle)
2022-10-20 14:19 ` Rob Herring
2022-10-20 14:27 ` Rob Herring
2022-10-20 16:08 ` Russell King (Oracle)
2022-10-20 22:06 ` Rob Herring
2022-10-20 14:31 ` Russell King (Oracle)
2022-10-19 13:28 ` [PATCH net-next 2/7] net: sfp: check firmware provided max power Russell King (Oracle)
2022-10-21 15:44 ` Andrew Lunn
2022-10-19 13:28 ` [PATCH net-next 3/7] net: sfp: ignore power level 2 prior to SFF-8472 Rev 10.2 Russell King (Oracle)
2022-10-21 15:45 ` Andrew Lunn
2022-10-19 13:29 ` Russell King (Oracle) [this message]
2022-10-21 15:46 ` [PATCH net-next 4/7] net: sfp: ignore power level 3 prior to SFF-8472 Rev 11.4 Andrew Lunn
2022-10-19 13:29 ` [PATCH net-next 5/7] net: sfp: provide a definition for the power level select bit Russell King (Oracle)
2022-10-21 15:46 ` Andrew Lunn
2022-10-19 13:29 ` [PATCH net-next 6/7] net: sfp: add sfp_modify_u8() helper Russell King (Oracle)
2022-10-21 15:50 ` Andrew Lunn
2022-10-19 13:29 ` [PATCH net-next 7/7] net: sfp: get rid of DM7052 hack when enabling high power Russell King (Oracle)
2022-10-21 15:52 ` Andrew Lunn
2022-10-21 16:16 ` Jakub Kicinski
2022-10-21 19:14 ` Russell King (Oracle)
2022-10-21 15:42 ` [PATCH net-next 0/7] net: sfp: improve high power module implementation Andrew Lunn
-- strict thread matches above, loose matches on Subject: below --
2022-10-21 15:08 [PATCH net-next v2 " Russell King (Oracle)
2022-10-21 15:09 ` [PATCH net-next 4/7] net: sfp: ignore power level 3 prior to SFF-8472 Rev 11.4 Russell King (Oracle)
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=E1ol981-00EDSj-FZ@rmk-PC.armlinux.org.uk \
--to=rmk+kernel@armlinux$(echo .)org.uk \
--cc=andrew@lunn$(echo .)ch \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=hkallweit1@gmail$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
/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