Skip to contentSkip to conversation

hwmon: (dell-smm) Extend fan support to 5 fans

PATCH Superseded Andrew Mark 3 participants 4 messages Jan 10 – Jan 14

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hwmon: (dell-smm) Extend fan support to 5 fans

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.

Also adds a DMI quirk for Precision Tower 5810 to provide accurate fan labels, as the BIOS reports generic types for these fans.

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

---
 drivers/hwmon/dell-smm-hwmon.c | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)
drivers/hwmon/dell-smm-hwmon.c +18 -1
index 6040a8940..b112e6fbc 100644
@@ -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)
@@ -175,6 +175,14 @@ static const char * const docking_labels[] = {
 	"Docking Other Fan",
 };
 
+static const char * const precision_tower_5810_labels[] = {
+	"CPU Fan",
+	"CPU Fan 2",
+	"Right DIMM Fan",
+	"Left DIMM Fan",
+	"PCIe Fan",
+};
+
 static inline const char __init *i8k_get_dmi_data(int field)
 {
 	const char *dmi_data = dmi_get_system_info(field);
@@ -991,6 +999,12 @@ static const char *dell_smm_fan_label(struct dell_smm_data *data, int channel)
 	if (type < 0)
 		return ERR_PTR(type);
 
+	if (dmi_match(DMI_PRODUCT_NAME, "Precision Tower 5810")) {
+		if (channel < ARRAY_SIZE(precision_tower_5810_labels))
+			return precision_tower_5810_labels[channel];
+		return "Unknown Fan";
+	}
+
 	if (type & 0x10) {
 		dock = true;
 		type &= 0x0F;
@@ -1129,12 +1143,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
 			   ),
 	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
 			   ),
 	NULL
Signature · 1 line
2.43.0
#1 lore raw

Am 10.01.26 um 04:47 schrieb Andrew Mark:

Quoted 43 lines

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.

Also adds a DMI quirk for Precision Tower 5810 to provide accurate fan labels, as the BIOS reports generic types for these fans.

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

---
  drivers/hwmon/dell-smm-hwmon.c | 19 ++++++++++++++++++-
  1 file changed, 18 insertions(+), 1 deletion(-)
drivers/hwmon/dell-smm-hwmon.c +1 -1
index 6040a8940..b112e6fbc 100644
@@ -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)

drivers/hwmon/dell-smm-hwmon.c static const char * const docking_labels[] = { · line 184

Quoted 10 lines
drivers/hwmon/dell-smm-hwmon.c +7 -0
@@ -175,6 +175,14 @@ static const char * const docking_labels[] = {
  	"Docking Other Fan",
  };
 
+static const char * const precision_tower_5810_labels[] = {
+	"CPU Fan",
+	"CPU Fan 2",
+	"Right DIMM Fan",
+	"Left DIMM Fan",
+	"PCIe Fan",
+};

Hi,

please use sensors3.conf to label you fans. Otherwise this driver will quickly almost exclusively consist of DMI quirks for such labels.

The other changes are fine.

Thanks,
Armin Wolf

Quoted 33 lines
drivers/hwmon/dell-smm-hwmon.c +10 -0
+
  static inline const char __init *i8k_get_dmi_data(int field)
  {
  	const char *dmi_data = dmi_get_system_info(field);
@@ -991,6 +999,12 @@ static const char *dell_smm_fan_label(struct dell_smm_data *data, int channel)
  	if (type < 0)
  		return ERR_PTR(type);
 
+	if (dmi_match(DMI_PRODUCT_NAME, "Precision Tower 5810")) {
+		if (channel < ARRAY_SIZE(precision_tower_5810_labels))
+			return precision_tower_5810_labels[channel];
+		return "Unknown Fan";
+	}
+
  	if (type & 0x10) {
  		dock = true;
  		type &= 0x0F;
@@ -1129,12 +1143,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
  			   ),
  	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
  			   ),
  	NULL
#2 lore raw

PATCH v2 1/1 hwmon: (dell-smm) Extend fan support to 5 fans

In reply to Andrew Mark

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

---
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(-)
drivers/hwmon/dell-smm-hwmon.c +4 -1
index 6040a8940..88263fa53 100644
@@ -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
 			   ),
 	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
 			   ),
 	NULL
Signature · 1 line
2.43.0
#3 lore raw
Quoted 44 lines · On Wed, 14 Jan 2026 02:54:57 +0000 Andrew Mark <[email protected]> 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

---
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(-)
drivers/hwmon/dell-smm-hwmon.c +1 -1
index 6040a8940..88263fa53 100644
@@ -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)

drivers/hwmon/dell-smm-hwmon.c static const struct hwmon_channel_info * const dell_smm_info[] = { · line 1134

Quoted 6 lines
drivers/hwmon/dell-smm-hwmon.c +2 -0
@@ -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...

drivers/hwmon/dell-smm-hwmon.c static const struct hwmon_channel_info * const dell_smm_info[] = { · line 1142

Quoted 8 lines
drivers/hwmon/dell-smm-hwmon.c +1 -0
 			   ),
 	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

Quoted 1 line
drivers/hwmon/dell-smm-hwmon.c +0 -0
 	NULL