summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc/allocator
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2026-11-09 18:14:18 -0800
committerGuenter Roeck <linux@roeck-us.net>2026-11-16 12:50:41 -0800
commit39cd14ca605d1aa55a0ad26767014a88b5c39f20 (patch)
treea436dbbe6654b021bd9eb4bfac2771171c33ae0d /rust/kernel/alloc/allocator
parent3cc60eb1b9aa07da81593f8f027efefb67185144 (diff)
hwmon: (nct6775) Fix tolerance bitmask when reading REG_FAN_MODE
On NCT6775, bits 0..3 of REG_FAN_MODE hold the temperature or fan speed tolerance (tolerance_mask is 0x0f), whereas on NCT5525, NCT6106, NCT6116, NCT6126, and NCT6776+, only bits 0..2 hold the temperature tolerance or low 3 bits of speed tolerance (tolerance_mask is 0x07). However, nct6775_update_pwm() masks fanmodecfg with a hardcoded 0x0f. When bit 3 of REG_FAN_MODE is set on chips where tolerance_mask is 0x07, nct6775_update_pwm() includes bit 3 in temp_tolerance[0] and target_speed_tolerance, corrupting reported tolerance values and causing pwm_update_registers() to OR bit 3 back into REG_FAN_MODE. Mask fanmodecfg with data->tolerance_mask instead of 0x0f in nct6775_update_pwm(). Fixes: cdcaeceb74ff ("hwmon: (nct6775) Add support for automatic fan control") Cc: stable@vger.kernel.org Reported-by: Sashiko <sashiko-bot@kernel.org> Cc: Anton Lundin <glance@ac2.se> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'rust/kernel/alloc/allocator')
0 files changed, 0 insertions, 0 deletions