]> Git Repo - linux.git/commit
hwmon: (mlxreg-fan) Return zero speed for broken fan
authorVadim Pasternak <[email protected]>
Sun, 12 Feb 2023 14:57:30 +0000 (16:57 +0200)
committerGuenter Roeck <[email protected]>
Sun, 12 Feb 2023 15:21:40 +0000 (07:21 -0800)
commita1ffd3c46267ee5c807acd780e15df9bb692223f
treec656a6c1313331b01670af51756b6f6b1414ce6c
parent102be2c2420bd156a94ea509932c9eaef89b9424
hwmon: (mlxreg-fan) Return zero speed for broken fan

Currently for broken fan driver returns value calculated based on error
code (0xFF) in related fan speed register.
Thus, for such fan user gets fan{n}_fault to 1 and fan{n}_input with
misleading value.

Add check for fan fault prior return speed value and return zero if
fault is detected.

Fixes: 65afb4c8e7e4 ("hwmon: (mlxreg-fan) Add support for Mellanox FAN driver")
Signed-off-by: Vadim Pasternak <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Guenter Roeck <[email protected]>
drivers/hwmon/mlxreg-fan.c
This page took 0.055864 seconds and 4 git commands to generate.