anyone try setting fan speed below 20% on sn2100?
maybe modify the linux/drivers/net/ethernet/mellanox/mlxsw code and recompile module is the right way?
these two files
maybe modify the linux/drivers/net/ethernet/mellanox/mlxsw code and recompile module is the right way?
these two files
Code:
https://github.com/torvalds/linux/blob/master/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c
https://github.com/torvalds/linux/blob/master/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c
static int mlxsw_thermal_set_cur_state(struct thermal_cooling_device *cdev,
unsigned long state)
{
struct mlxsw_thermal *thermal = cdev->devdata;
struct device *dev = thermal->bus_info->dev;
char mfsc_pl[MLXSW_REG_MFSC_LEN];
int idx;
int err;
if (state > MLXSW_THERMAL_MAX_STATE)
return -EINVAL;
idx = mlxsw_get_cooling_device_idx(thermal, cdev);
if (idx < 0)
return idx;
/* Normalize the state to the valid speed range. */
state = max_t(unsigned long, MLXSW_THERMAL_MIN_STATE, state);
mlxsw_reg_mfsc_pack(mfsc_pl, idx, mlxsw_state_to_duty(state));
err = mlxsw_reg_write(thermal->core, MLXSW_REG(mfsc), mfsc_pl);
if (err) {
dev_err(dev, "Failed to write PWM duty\n");
return err;
}
return 0;
}