diff options
author | David S. Miller <davem@davemloft.net> | 2019-05-18 13:13:40 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-18 13:13:40 -0700 |
commit | ee8a2b95b737d5989efeb477d5a1ef5e6955b830 (patch) | |
tree | bec4eeb2158d856439ff0c065d652f399375065c /drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c | |
parent | vsock/virtio: Initialize core virtio vsock before registering the driver (diff) | |
parent | mlxsw: core: Prevent reading unsupported slave address from SFP EEPROM (diff) | |
download | linux-dev-ee8a2b95b737d5989efeb477d5a1ef5e6955b830.tar.xz linux-dev-ee8a2b95b737d5989efeb477d5a1ef5e6955b830.zip |
Merge branch 'mlxsw-Two-port-module-fixes'
Ido Schimmel says:
====================
mlxsw: Two port module fixes
Patch #1 fixes driver initialization failure on old ASICs due to
unsupported register access. This is fixed by first testing if the
register is supported.
Patch #2 fixes reading of certain modules' EEPROM. The problem and
solution are explained in detail in the commit message.
Please consider both patches for stable.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c b/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c index 6956bbebe2f1..496dc904c5ed 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c +++ b/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c @@ -518,6 +518,9 @@ static int mlxsw_hwmon_module_init(struct mlxsw_hwmon *mlxsw_hwmon) u8 width; int err; + if (!mlxsw_core_res_query_enabled(mlxsw_hwmon->core)) + return 0; + /* Add extra attributes for module temperature. Sensor index is * assigned to sensor_count value, while all indexed before * sensor_count are already utilized by the sensors connected through |