lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20260114094959.71b35f05@pumpkin>
Date: Wed, 14 Jan 2026 09:49:59 +0000
From: David Laight <david.laight.linux@...il.com>
To: Andrew Mark <android606@...il.com>
Cc: armin.wolf@...edded-designs.de, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] hwmon: (dell-smm) Extend fan support to 5 fans

On Wed, 14 Jan 2026 02:54:57 +0000
Andrew Mark <android606@...il.com> wrote:

> Dell Precision Tower workstations have 5 fan connectors, but the
> driver was limited to 4 fans after commit dbcfcb239b3b ("hwmon:
> (dell-smm) Increment the number of fans").
> 
> This patch increases DELL_SMM_NO_FANS to 5 and adds the necessary
> hwmon channel info for the fifth fan and its PWM control.
> 
> Without this patch, the PCIe/GPU cooling fan (fan 5) is not
> controllable, which can lead to overheating on systems with
> high-power fanless GPUs that depend on chassis cooling.
> 
> Tested on Dell Precision Tower 5810 (BIOS A34) with all 5 fans
> responding correctly to PWM control.
> 
> Fan mapping for Precision Tower 5810:
> - fan0: CPU heatsink
> - fan1: Second CPU (dual-CPU systems only)
> - fan2: Right DIMM bank
> - fan3: Left DIMM bank
> - fan4: PCIe/GPU cooling
> 
> Signed-off-by: Andrew Mark <android606@...il.com>
> ---
> v2:
>  - Removed DMI quirks changes. Setting fan type names in sensors3 config
>    instead.
>  
>  drivers/hwmon/dell-smm-hwmon.c | 5 +++++
>  1 file changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
> index 6040a8940..88263fa53 100644
> --- a/drivers/hwmon/dell-smm-hwmon.c
> +++ b/drivers/hwmon/dell-smm-hwmon.c
> @@ -74,7 +74,7 @@
>  #define DELL_SMM_LEGACY_EXECUTE	0x1
>  
>  #define DELL_SMM_NO_TEMP	10
> -#define DELL_SMM_NO_FANS	4
> +#define DELL_SMM_NO_FANS	5
>  
>  /* limit fan multiplier to avoid overflow */
>  #define DELL_SMM_MAX_FAN_MULT (INT_MAX / U16_MAX)
> @@ -1129,12 +1129,15 @@ static const struct hwmon_channel_info * const dell_smm_info[] = {
>  			   HWMON_F_INPUT | HWMON_F_LABEL | HWMON_F_MIN | HWMON_F_MAX |
>  			   HWMON_F_TARGET,
>  			   HWMON_F_INPUT | HWMON_F_LABEL | HWMON_F_MIN | HWMON_F_MAX |
> +			   HWMON_F_TARGET,
> +			   HWMON_F_INPUT | HWMON_F_LABEL | HWMON_F_MIN | HWMON_F_MAX |
>  			   HWMON_F_TARGET

I'd have used a different indentation rule to get each value on one line...

>  			   ),
>  	HWMON_CHANNEL_INFO(pwm,
>  			   HWMON_PWM_INPUT | HWMON_PWM_ENABLE,
>  			   HWMON_PWM_INPUT | HWMON_PWM_ENABLE,
>  			   HWMON_PWM_INPUT | HWMON_PWM_ENABLE,
> +			   HWMON_PWM_INPUT | HWMON_PWM_ENABLE,
>  			   HWMON_PWM_INPUT | HWMON_PWM_ENABLE
>  			   ),

That code is just crying out for:
#define HWMON_CHANNEL_INFO_N(stype, count, val) \
	HWMON_CHANNEL_INFO(stype, [0 ... (count) - 1] = val)
so you can do:
	HWMON_CHANNEL_INFO_N(pwm, DELL_SMM_NO_FANS,
			HWMON_PWM_INPUT | HWMON_PWM_ENABLE)

	David


>  	NULL


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ