aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2019-05-18 13:13:40 -0700
committerDavid S. Miller <davem@davemloft.net>2019-05-18 13:13:40 -0700
commitee8a2b95b737d5989efeb477d5a1ef5e6955b830 (patch)
treebec4eeb2158d856439ff0c065d652f399375065c /drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c
parentvsock/virtio: Initialize core virtio vsock before registering the driver (diff)
parentmlxsw: core: Prevent reading unsupported slave address from SFP EEPROM (diff)
downloadlinux-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.c3
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