Skip to contentSkip to conversation

FAILED: patch "[PATCH] hwmon: (nct6775) Fix target temp and tolerance for" failed to apply to 7.3-stable tree

PATCH New [email protected] 2 participants 2 messages Dec 2 – Dec 4

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 7.3-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-7.3.y
git checkout FETCH_HEAD
git cherry-pick -x 73d857b33cdfaf35f8d3f833b36745d91c18db13
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026120240-citrus-penpal-283b@gregkh' --subject-prefix 'PATCH 7.3.y' 'HEAD^..'

Possible dependencies:

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 73d857b33cdfaf35f8d3f833b36745d91c18db13 Mon Sep 17 00:00:00 2001
From: Guenter Roeck <[email protected]>
Date: Mon, 9 Nov 2026 17:54:35 -0800
Subject: [PATCH] hwmon: (nct6775) Fix target temp and tolerance for
NCT6106/6116/6126

In nct6775_probe(), the nct6106, nct6116, and nct6126 chip cases leave target_temp_mask, tolerance_mask, and speed_tolerance_limit zero-initialized.

As a result, reading pwm*_target_temp from sysfs always returns 0, writing to pwm*_target_temp, pwm*_temp_tolerance, pwm*_crit_temp_tolerance, or fan*_tolerance clamps user-supplied values to 0, and pwm_update_registers() fails to clear existing tolerance bits in REG_FAN_MODE when updating fan control modes.

Initialize target_temp_mask to 0xff, tolerance_mask to 0x07, and speed_tolerance_limit to 63 for NCT6106, NCT6116, and NCT6126, matching the hardware register layout shared with NCT5525 and NCT6776+.

Fixes 6c009501ff20 ("hwmon: (nct6775) Add support for NCT6102D/6106D")
Fixes 29c7cb485b32 ("hwmon: (nct6775) Integrate new model nct6116")
Fixes 437b3c2a4bdc ("hwmon: (nct6775) Add support for NCT6126D")
Cc Anton Lundin <[email protected]>
drivers/hwmon/nct6775-core.c +9 -0
index ac6f3f0ca2b3..123d62a87a43 100644
@@ -3572,6 +3572,9 @@ int nct6775_probe(struct device *dev, struct nct6775_data *data,
 
 		data->fan_from_reg = fan_from_reg13;
 		data->fan_from_reg_min = fan_from_reg13;
+		data->target_temp_mask = 0xff;
+		data->tolerance_mask = 0x07;
+		data->speed_tolerance_limit = 63;
 
 		data->temp_label = nct6776_temp_label;
 		data->temp_mask = NCT6776_TEMP_MASK;
@@ -3648,6 +3651,9 @@ int nct6775_probe(struct device *dev, struct nct6775_data *data,
 
 		data->fan_from_reg = fan_from_reg13;
 		data->fan_from_reg_min = fan_from_reg13;
+		data->target_temp_mask = 0xff;
+		data->tolerance_mask = 0x07;
+		data->speed_tolerance_limit = 63;
 
 		data->temp_label = nct6776_temp_label;
 		data->temp_mask = NCT6776_TEMP_MASK;
@@ -3725,6 +3731,9 @@ int nct6775_probe(struct device *dev, struct nct6775_data *data,
 
 		data->fan_from_reg = fan_from_reg13;
 		data->fan_from_reg_min = fan_from_reg13;
+		data->target_temp_mask = 0xff;
+		data->tolerance_mask = 0x07;
+		data->speed_tolerance_limit = 63;
 
 		data->temp_label = nct6776_temp_label;
 		data->temp_mask = NCT6776_TEMP_MASK;
maintainer
#1 lore raw

PATCH 1/1 hwmon: (nct6775) Fix target temp and tolerance for NCT6106/6116/6126

From: Guenter Roeck <[email protected]>

[ Upstream commit 73d857b33cdfaf35f8d3f833b36745d91c18db13 ]

In nct6775_probe(), the nct6106, nct6116, and nct6126 chip cases leave target_temp_mask, tolerance_mask, and speed_tolerance_limit zero-initialized.

As a result, reading pwm*_target_temp from sysfs always returns 0, writing to pwm*_target_temp, pwm*_temp_tolerance, pwm*_crit_temp_tolerance, or fan*_tolerance clamps user-supplied values to 0, and pwm_update_registers() fails to clear existing tolerance bits in REG_FAN_MODE when updating fan control modes.

Initialize target_temp_mask to 0xff, tolerance_mask to 0x07, and speed_tolerance_limit to 63 for NCT6106, NCT6116, and NCT6126, matching the hardware register layout shared with NCT5525 and NCT6776+.

Fixes 6c009501ff20 ("hwmon: (nct6775) Add support for NCT6102D/6106D")
Fixes 29c7cb485b32 ("hwmon: (nct6775) Integrate new model nct6116")
Fixes 437b3c2a4bdc ("hwmon: (nct6775) Add support for NCT6126D")
Cc Anton Lundin <[email protected]>
[ sashal: Applied the three target_temp/tolerance assignments to the nct6106 and nct6116 cases only, dropping the nct6126 hunk because this tree has no nct6126 support. ]
---
 drivers/hwmon/nct6775-core.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/hwmon/nct6775-core.c +6 -0
index 8d1dfad675bb4..9acd532b05113 100644
@@ -3534,6 +3534,9 @@ int nct6775_probe(struct device *dev, struct nct6775_data *data,
 
 		data->fan_from_reg = fan_from_reg13;
 		data->fan_from_reg_min = fan_from_reg13;
+		data->target_temp_mask = 0xff;
+		data->tolerance_mask = 0x07;
+		data->speed_tolerance_limit = 63;
 
 		data->temp_label = nct6776_temp_label;
 		data->temp_mask = NCT6776_TEMP_MASK;
@@ -3610,6 +3613,9 @@ int nct6775_probe(struct device *dev, struct nct6775_data *data,
 
 		data->fan_from_reg = fan_from_reg13;
 		data->fan_from_reg_min = fan_from_reg13;
+		data->target_temp_mask = 0xff;
+		data->tolerance_mask = 0x07;
+		data->speed_tolerance_limit = 63;
 
 		data->temp_label = nct6776_temp_label;
 		data->temp_mask = NCT6776_TEMP_MASK;
Signature · 1 line
2.53.0