]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: sfp: Handle unimplemented hwmon limits and alarms
authorAndrew Lunn <andrew@lunn.ch>
Tue, 4 Sep 2018 02:23:56 +0000 (04:23 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 4 Sep 2018 19:22:41 +0000 (12:22 -0700)
commitbad9861f40c88fc4ed6505ab9b05237a1b9f24c6
tree8732e6fef20d32540370f51d03d2dbf30eab76cb
parent5f346ad6628d8f5a1e36082c08759e061c5b664c
net: phy: sfp: Handle unimplemented hwmon limits and alarms

Not all SFPs implement the registers containing sensor limits and
alarms. Luckily, there is a bit indicating if they are implemented or
not. Add checking for this bit, when deciding if the hwmon attributes
should be visible.

Fixes: d7f1b042f3e0 ("net: phy: sfp: Add HWMON support for module sensors")
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/sfp.c