Commit 18cc659e authored by Russell King (Oracle)'s avatar Russell King (Oracle) Committed by Jakub Kicinski

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: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 02eaf5a7
...@@ -1761,7 +1761,8 @@ static int sfp_module_parse_power(struct sfp *sfp) ...@@ -1761,7 +1761,8 @@ static int sfp_module_parse_power(struct sfp *sfp)
u32 power_mW = 1000; u32 power_mW = 1000;
bool supports_a2; 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; power_mW = 1500;
if (sfp->id.ext.options & cpu_to_be16(SFP_OPTIONS_HIGH_POWER_LEVEL)) if (sfp->id.ext.options & cpu_to_be16(SFP_OPTIONS_HIGH_POWER_LEVEL))
power_mW = 2000; power_mW = 2000;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment