NetBSD Problem Report #59802
From www@netbsd.org Sat Nov 29 02:35:44 2025
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
client-signature RSA-PSS (2048 bits) client-digest SHA256)
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id A82E81A9239
for <gnats-bugs@gnats.NetBSD.org>; Sat, 29 Nov 2025 02:35:44 +0000 (UTC)
Message-Id: <20251129023543.2CF951A923A@mollari.NetBSD.org>
Date: Sat, 29 Nov 2025 02:35:43 +0000 (UTC)
From: isaki@pastel-flower.jp
Reply-To: isaki@pastel-flower.jp
To: gnats-bugs@NetBSD.org
Subject: lm(4): Support five aux fans for NCT6794D
X-Send-Pr-Version: www-1.0
>Number: 59802
>Category: kern
>Synopsis: lm(4): Support five aux fans for NCT6794D
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: isaki
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sat Nov 29 02:40:00 +0000 2025
>Closed-Date: Mon Feb 02 04:09:30 +0000 2026
>Last-Modified: Mon Feb 02 04:09:30 +0000 2026
>Originator: Tetsuya Isaki
>Release: NetBSD 11.0_BETA
>Organization:
>Environment:
NetBSD XXXXX 11.0_BETA NetBSD 11.0_BETA (GENERIC) #1: Thu Oct 16 15:19:01 JST 2025 isaki@XXXXX:/var/obj/11/amd64/obj/sys/arch/amd64/compile/GENERIC amd64
>Description:
NCT6794D has five aux fan sensors but current lm(4) only detects three.
Current nslm7x.c looks to identify all NCT679*D as NCT6779D and its family,
and nct6779d_sensors[] defines three aux fans.
According to datasheet NCT6791D has three aux fan sensors, but
at least NCT{6794,6796}D seem to have five aux fan sensors.
# The top marking of my chip is NCT6794D-E. The chip revision returned
# by this chip is 0x4d:2a. So lm(4) identifies it as NCT6798D.
# But I won't be concerned with that difference here.
The following patch adds two extra fans to nct6779d_sensors[] and
I was able to get RPM readings from them by envstat(8)!
(My motherboard has four fan connectors and it looks to connect to aux fan
sensor {0, 1, 3, 4} on NCT6794D-E. I got readings from all four fans.)
However, I don't have access to any other NCT67** controllers.
I hope someone can take a look at this.
--- sys/dev/ic/nslm7x.c.ORG
+++ sys/dev/ic/nslm7x.c
@@ -2122,6 +2122,22 @@
.refresh = wb_nct6776f_refresh_fanrpm,
.rfact = 0
},
+ {
+ .desc = "Aux Fan3",
+ .type = ENVSYS_SFANRPM,
+ .bank = 4,
+ .reg = 0xca,
+ .refresh = wb_nct6776f_refresh_fanrpm,
+ .rfact = 0
+ },
+ {
+ .desc = "Aux Fan4",
+ .type = ENVSYS_SFANRPM,
+ .bank = 4,
+ .reg = 0xce,
+ .refresh = wb_nct6776f_refresh_fanrpm,
+ .rfact = 0
+ },
{ .desc = NULL }
};
Here is related part of dmesg:
:
pci4 at ppb3 bus 4
pci4: i/o space, memory space enabled, rd/line, wr/inv ok
pcib0 at pci0 dev 31 function 0: Intel B760 eSPI (rev. 0x11)
ichsmb0 at pci0 dev 31 function 4: Intel 700 Series PCH SMBus (rev. 0x11)
ichsmb0: interrupting at ioapic0 pin 18
iic0 at ichsmb0: I2C bus
Intel 700 Series PCH SPI (FLASH) (miscellaneous serial bus, revision 0x11) at pci0 dev 31 function 5 not configured
isa0 at pcib0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, 16-byte FIFO
pckbc0 at isa0 port 0x60-0x64
pcppi0 at isa0 port 0x61
:
# modload lm_wbsio
wbsio0 at isa0 port 0x2e-0x2f: Nuvoton LPC Super I/O NCT6798D rev C
lm0 at wbsio0 port 0x2a0-0x2a7
lm0: Using default temp sensors
lm0: Nuvoton NCT6798D Hardware monitor
>How-To-Repeat:
Boot 11.0_BETA kernel and:
# modload lm_wbsio
# envstat
Current CritMax WarnMax WarnMin CritMin Unit
(snip)
[lm0]
VCore: 0.920 V
VIN1: 10.982 V
AVCC: 3.424 V
+3.3V: 3.344 V
VIN0: 11.814 V
VIN8: 0.888 V
VIN4: 2.400 V
+3.3VSB: 3.424 V
VBAT: 0.000 V
VTT: 1.056 V
VIN5: 1.072 V
VIN6: 0.832 V
VIN2: 2.000 V
VIN3: 2.422 V
VIN7: 1.496 V
MB Temperature: 30.000 degC
CPU Temperature: 18.000 degC
Aux Temp0: 15.000 degC
Aux Temp1: 22.000 degC
Aux Temp2: 35.000 degC
Aux Temp3: 0.000 degC
System Fan: N/A
CPU Fan: 1053 RPM
Aux Fan0: 559 RPM
Aux Fan1: 512 RPM
Aux Fan2: N/A
#
>Fix:
Apply the above patch.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: kern-bug-people->isaki
Responsible-Changed-By: isaki@NetBSD.org
Responsible-Changed-When: Wed, 24 Dec 2025 07:28:23 +0000
Responsible-Changed-Why:
I take it.
State-Changed-From-To: open->needs-pullups
State-Changed-By: isaki@NetBSD.org
State-Changed-When: Wed, 24 Dec 2025 07:28:23 +0000
State-Changed-Why:
Committed. I'll pullup to netbsd-11 later.
From: "Tetsuya Isaki" <isaki@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59802 CVS commit: src/sys/dev/ic
Date: Wed, 24 Dec 2025 07:25:25 +0000
Module Name: src
Committed By: isaki
Date: Wed Dec 24 07:25:25 UTC 2025
Modified Files:
src/sys/dev/ic: nslm7x.c
Log Message:
Support AuxFan3 and AuxFan4 sensors for NCT6794D.
PR kern/59802
To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/dev/ic/nslm7x.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: needs-pullups->pending-pullups
State-Changed-By: isaki@NetBSD.org
State-Changed-When: Wed, 21 Jan 2026 12:18:37 +0000
State-Changed-Why:
[pullup-11 #160]
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59802 CVS commit: [netbsd-11] src/sys/dev/ic
Date: Thu, 22 Jan 2026 20:33:18 +0000
Module Name: src
Committed By: martin
Date: Thu Jan 22 20:33:18 UTC 2026
Modified Files:
src/sys/dev/ic [netbsd-11]: nslm7x.c
Log Message:
Pull up following revision(s) (requested by isaki in ticket #160):
sys/dev/ic/nslm7x.c: revision 1.80
Support AuxFan3 and AuxFan4 sensors for NCT6794D.
PR kern/59802
To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.79.10.1 src/sys/dev/ic/nslm7x.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: pending-pullups->closed
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Mon, 02 Feb 2026 04:09:30 +0000
State-Changed-Why:
pullup-11 #160 resolved (not applicable or worth it for <11, I guess?)
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.