]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
hwmon: mlxreg-fan: Prevent fans from getting stuck at 0 RPM
authorVadim Pasternak <vadimp@nvidia.com>
Wed, 30 Jul 2025 20:17:15 +0000 (23:17 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Sep 2025 16:54:22 +0000 (18:54 +0200)
commit195e41ac71e4f7d78504592c7e8f31ab1a6b53ff
tree6246f9303b85f0eb2f305770f8df97f4336c5de7
parent06b26e3099207c94b3d1be8565aedc6edc4f0a60
hwmon: mlxreg-fan: Prevent fans from getting stuck at 0 RPM

[ Upstream commit 1180c79fbf36e4c02e76ae4658509523437e52a4 ]

The fans controlled by the driver can get stuck at 0 RPM if they are
configured below a 20% duty cycle. The driver tries to avoid this by
enforcing a minimum duty cycle of 20%, but this is done after the fans
are registered with the thermal subsystem. This is too late as the
thermal subsystem can set their current state before the driver is able
to enforce the minimum duty cycle.

Fix by setting the minimum duty cycle before registering the fans with
the thermal subsystem.

Fixes: d7efb2ebc7b3 ("hwmon: (mlxreg-fan) Extend driver to support multiply cooling devices")
Reported-by: Nikolay Aleksandrov <razor@blackwall.org>
Tested-by: Nikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
Link: https://lore.kernel.org/r/20250730201715.1111133-1-vadimp@nvidia.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hwmon/mlxreg-fan.c