From: Guenter Roeck <[email protected]> The value of max_output and step_output registers isn't read from the respective registers. As a result, zero values are returned to the user through the respective sysfs attributes, instead of the actual fan control settings.
The problem is fixed by updating the fan max output and fan step output information from data in registers. Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Jean Delvare <[email protected]> --- Paul, Andi, while mainstream commit da2e025590cf7038440132d4bbc967a579b11112 presented itself as a cleanup patch, it does actually include one bug fix which I think would be good to have in longterm kernels 2.6.35 and 2.6.34. Thanks. drivers/hwmon/w83627ehf.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) --- linux-2.6.34.orig/drivers/hwmon/w83627ehf.c 2010-09-18 18:25:32.000000000 +0200 +++ linux-2.6.34/drivers/hwmon/w83627ehf.c 2011-01-14 22:12:47.000000000 +0100 @@ -524,7 +524,7 @@ static struct w83627ehf_data *w83627ehf_ } } - for (i = 0; i < 4; i++) { + for (i = 0; i < data->pwm_num; i++) { /* pwmcfg, tolerance mapped for i=0, i=1 to same reg */ if (i != 1) { pwmcfg = w83627ehf_read_value(data, @@ -546,6 +546,17 @@ static struct w83627ehf_data *w83627ehf_ W83627EHF_REG_FAN_STOP_OUTPUT[i]); data->fan_stop_time[i] = w83627ehf_read_value(data, W83627EHF_REG_FAN_STOP_TIME[i]); + + if (W83627EHF_REG_FAN_MAX_OUTPUT[i] != 0xff) + data->fan_max_output[i] = + w83627ehf_read_value(data, + W83627EHF_REG_FAN_MAX_OUTPUT[i]); + + if (W83627EHF_REG_FAN_STEP_OUTPUT[i] != 0xff) + data->fan_step_output[i] = + w83627ehf_read_value(data, + W83627EHF_REG_FAN_STEP_OUTPUT[i]); + data->target_temp[i] = w83627ehf_read_value(data, W83627EHF_REG_TARGET[i]) & -- Jean Delvare _______________________________________________ stable mailing list [email protected] http://linux.kernel.org/mailman/listinfo/stable
