Skip to content

Commit b626f2c

Browse files
jpirkodavem330
authored andcommitted
mlxsw: core: Fix temperature sensor index during initialization
Sensor index should be passed instead of 0. For now, this does not make a difference, since there is so far only one temperature sensor exposed by HW. Fixes: 89309da ("mlxsw: core: Implement temperature hwmon interface") Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent acf35a4 commit b626f2c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ static int mlxsw_hwmon_temp_init(struct mlxsw_hwmon *mlxsw_hwmon)
242242
}
243243
sensor_count = mlxsw_reg_mtcap_sensor_count_get(mtcap_pl);
244244
for (i = 0; i < sensor_count; i++) {
245-
mlxsw_reg_mtmp_pack(mtmp_pl, 0, true, true);
245+
mlxsw_reg_mtmp_pack(mtmp_pl, i, true, true);
246246
err = mlxsw_reg_write(mlxsw_hwmon->core,
247247
MLXSW_REG(mtmp), mtmp_pl);
248248
if (err) {

0 commit comments

Comments
 (0)