diff options
author | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2022-10-21 16:09:49 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-10-24 21:06:06 -0700 |
commit | 18cc659e95ab1661254bde815fc9345246d98906 (patch) | |
tree | 8fb508ac79700ca3bfa074075585cb2d948159ad /drivers/net/phy/sfp.c | |
parent | 02eaf5a79100468425fae2d0baf144b6068fc4cc (diff) | |
download | linux-18cc659e95ab1661254bde815fc9345246d98906.tar.gz linux-18cc659e95ab1661254bde815fc9345246d98906.tar.bz2 linux-18cc659e95ab1661254bde815fc9345246d98906.zip |
net: sfp: ignore power level 2 prior to SFF-8472 Rev 10.2
Power level 2 was introduced by SFF-8472 revision 10.2. Ignore
the power declaration bit for modules that are not compliant with
at least this revision.
This should remove any spurious indication of 1.5W modules.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/phy/sfp.c')
-rw-r--r-- | drivers/net/phy/sfp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c index f7ad4d5d9041..a7635b02524a 100644 --- a/drivers/net/phy/sfp.c +++ b/drivers/net/phy/sfp.c @@ -1761,7 +1761,8 @@ static int sfp_module_parse_power(struct sfp *sfp) u32 power_mW = 1000; bool supports_a2; - if (sfp->id.ext.options & cpu_to_be16(SFP_OPTIONS_POWER_DECL)) + 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)) power_mW = 2000; |