OSDN Git Service

net: sfp: check firmware provided max power
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Fri, 21 Oct 2022 15:09:43 +0000 (16:09 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 25 Oct 2022 04:05:54 +0000 (21:05 -0700)
commit02eaf5a79100468425fae2d0baf144b6068fc4cc
tree25461860b2fb53efabf74a6896f2bb235ae76603
parenta272bcb9e5ef0cce6bbfe52e52c9fc69bb90e1ca
net: sfp: check firmware provided max power

Check that the firmware provided maximum power is at least 1W, which
is the minimum power level for any SFP module.

Now that we enforce the minimum of 1W, we can exit early from
sfp_module_parse_power() if the module power is 1W or less.

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>
drivers/net/phy/sfp.c