From: Armin Wolf W_Armin@gmx.de
[ Upstream commit ddb61e737f04e3c6c8299c1e00bf17a42a7f05cf ]
It turns out the second fan on the Dell Precision 490 does not really support I8K_FAN_TURBO. Setting the fan state to 3 enables automatic fan control, just like on the other two fans. The reason why this was misinterpreted as turbo mode was that the second fan normally spins faster in automatic mode than in the previous fan states. Yet when in state 3, the fan speed reacts to heat exposure, exposing the automatic mode setting.
Link: https://github.com/lm-sensors/lm-sensors/pull/383 Signed-off-by: Armin Wolf W_Armin@gmx.de Link: https://lore.kernel.org/r/20250917181036.10972-2-W_Armin@gmx.de Signed-off-by: Guenter Roeck linux@roeck-us.net Signed-off-by: Sasha Levin sashal@kernel.org ---
LLM Generated explanations, may be completely bogus:
YES
- What it fixes - Corrects a long‑standing misinterpretation on Dell Precision 490: fan state 3 is automatic mode, not a manual “turbo” speed. Keeping `fan_max = I8K_FAN_TURBO` (3) wrongly exposed a manual level that the hardware doesn’t actually support, leading to incorrect sysfs behavior and user‑space control on that model.
- Scope and change details - Removes the model‑specific override for Precision 490: - Deletes the model enum entry `DELL_PRECISION_490` from `drivers/hwmon/dell-smm-hwmon.c:1390`. - Removes its `i8k_config_data` entry which set `.fan_mult = 1` and `.fan_max = I8K_FAN_TURBO` at `drivers/hwmon/dell-smm- hwmon.c:1395-1407` (only the Precision 490 block is removed). - Drops the DMI entry and associated `driver_data` hook in `i8k_config_dmi_table` at `drivers/hwmon/dell-smm- hwmon.c:1410-1435`. - No functional code paths are changed; only a DMI quirk is removed.
- Why the behavior is now correct and safer - With the quirk gone, the driver falls back to default limits: - `data->i8k_fan_max = fan_max ? : I8K_FAN_HIGH;` so max manual fan state defaults to 2, not 3 (drivers/hwmon/dell-smm-hwmon.c:1256). This prevents treating the special state 3 as a regular manual speed. - The driver already autodetects `fan_mult` (sets it to 1 if nominal RPM looks like true RPM): see autodetection at `drivers/hwmon/dell-smm-hwmon.c:1231`. So removing the Precision‑490 `fan_mult=1` override does not regress RPM reporting. - Correct sysfs reporting and control of automatic mode: - The driver interprets state 3 as “auto” (`I8K_FAN_AUTO == 3`; include/uapi/linux/i8k.h:36-41). When `i8k_fan_max` is 2, a returned state 3 is “> data->i8k_fan_max” and thus treated as auto, not a manual PWM value (drivers/hwmon/dell-smm- hwmon.c:956-960). - The `pwmX_enable` knob is only exposed when `i8k_fan_max < I8K_FAN_AUTO` (drivers/hwmon/dell-smm-hwmon.c:878). With the bad `fan_max=3` gone, Precision 490 now correctly gets `pwm_enable` to reflect/toggle auto mode per hardware behavior (and `hwmon_pwm_enable` reading maps auto to 2 at drivers/hwmon/dell- smm-hwmon.c:966-969).
- Historical context and correctness - The removed quirk dates back to i8k: “Add support for Dell Precision 490 ...” which set `fan_max = I8K_FAN_TURBO` (commit 7b88344631536, in legacy i8k driver). Newer understanding (and documentation) clarified that several machines, including Precision 490, use state 3 as a “magic” auto state rather than a manual turbo. - Documentation now reflects this behavior (Documentation/hwmon/dell- smm-hwmon.rst:360-366, 375).
- Stable backport criteria - Important user-visible bugfix: prevents exposing/allowing a non‑existent manual fan level and aligns sysfs with hardware behavior. - Small and contained: 14 line deletions in a single driver source file; no API/ABI changes; affects only Precision 490 via DMI. - Low regression risk: default paths are mature; `fan_mult` autodetection covers the removed override; no architectural changes. - No dependency on broader refactors: The removal stands alone. It synergizes with “automatic fan mode” support (mainline improvement), but even on older stable trees it simply avoids mislabeling 3 as a valid manual state.
- Conclusion - This is a classic quirk fix: minimal, model‑specific, and correcting wrong behavior. It should be backported to stable trees that still contain the Precision 490 DMI override so those kernels no longer misrepresent fan capabilities on that system.
drivers/hwmon/dell-smm-hwmon.c | 14 -------------- 1 file changed, 14 deletions(-)
diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c index 1e2c8e2840015..3f61b2d7935e4 100644 --- a/drivers/hwmon/dell-smm-hwmon.c +++ b/drivers/hwmon/dell-smm-hwmon.c @@ -1331,7 +1331,6 @@ struct i8k_config_data {
enum i8k_configs { DELL_LATITUDE_D520, - DELL_PRECISION_490, DELL_STUDIO, DELL_XPS, }; @@ -1341,10 +1340,6 @@ static const struct i8k_config_data i8k_config_data[] __initconst = { .fan_mult = 1, .fan_max = I8K_FAN_TURBO, }, - [DELL_PRECISION_490] = { - .fan_mult = 1, - .fan_max = I8K_FAN_TURBO, - }, [DELL_STUDIO] = { .fan_mult = 1, .fan_max = I8K_FAN_HIGH, @@ -1364,15 +1359,6 @@ static const struct dmi_system_id i8k_config_dmi_table[] __initconst = { }, .driver_data = (void *)&i8k_config_data[DELL_LATITUDE_D520], }, - { - .ident = "Dell Precision 490", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), - DMI_MATCH(DMI_PRODUCT_NAME, - "Precision WorkStation 490"), - }, - .driver_data = (void *)&i8k_config_data[DELL_PRECISION_490], - }, { .ident = "Dell Studio", .matches = {