From: sashiko-bot@kernel.org
To: "Paul Louvel" <paul.louvel@bootlin.com>
Cc: linux-watchdog@vger.kernel.org
Subject: Re: [PATCH v2 1/2] watchdog: w83627hf_wdt: Add support for Nuvoton NCT6126
Date: Mon, 06 Jul 2026 10:30:07 +0000 [thread overview]
Message-ID: <20260706103007.D4B561F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260706-w83627hf_wdt-nct6126d-v2-1-77af74af88ae@bootlin.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Missing hardware reset initialization for the NCT6126 watchdog chip.
--
commit e0ddc629265e45d1982854f304eefd4e2a86e9dc
Author: Paul Louvel <paul.louvel@bootlin.com>
watchdog: w83627hf_wdt: Add support for Nuvoton NCT6126
This commit adds support for the Nuvoton NCT6126 hardware watchdog to the
w83627hf_wdt driver. It differentiates the NCT6126 from the NCT6116 by
checking the low byte of the chip ID.
> diff --git a/drivers/watchdog/w83627hf_wdt.c b/drivers/watchdog/w83627hf_wdt.c
> index bc33b63c5a5df..1f649fda8a813 100644
> --- a/drivers/watchdog/w83627hf_wdt.c
> +++ b/drivers/watchdog/w83627hf_wdt.c
[ ... ]
> @@ -428,7 +430,12 @@ static int wdt_find(int addr)
> cr_wdt_csr = NCT6102D_WDT_CSR;
> break;
> case NCT6116_ID:
> - ret = nct6116;
> + val = superio_inb(0x21);
> + if (val == NCT6126_VER_A_LOW_ID || val == NCT6126_VER_B_LOW_ID)
> + ret = nct6126;
[Severity: High]
Does this code miss updating the switch statement in w83627hf_init() to
include nct6126?
Looking at w83627hf_init(), the other NCT chips are explicitly handled to
enable the WDTO# output pulse:
drivers/watchdog/w83627hf_wdt.c:w83627hf_init() {
...
case nct6102:
case nct6116:
/*
* These chips have a fixed WDTO# output pin (W83627UHG),
* or support more than one WDTO# output pin.
* Don't touch its configuration, and hope the BIOS
* does the right thing.
*/
t = superio_inb(cr_wdt_control);
t |= 0x02; /* enable the WDTO# output low pulse
* to the KBRST# pin */
superio_outb(cr_wdt_control, t);
break;
default:
break;
...
}
If nct6126 isn't added to this switch statement, it will fall through to the
default case. Will this cause the chip to skip enabling the reset logic,
resulting in the watchdog timing out without physically resetting the system?
> + else
> + ret = nct6116;
> +
> cr_wdt_timeout = NCT6102D_WDT_TIMEOUT;
> cr_wdt_control = NCT6102D_WDT_CONTROL;
> cr_wdt_csr = NCT6102D_WDT_CSR;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260706-w83627hf_wdt-nct6126d-v2-0-77af74af88ae@bootlin.com?part=1
next prev parent reply other threads:[~2026-07-06 10:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-06 10:19 [PATCH v2 0/2] watchdog: w83627hf_wdt: Add NCT6126 support and improve handling of running watchdog Paul Louvel
2026-07-06 10:19 ` [PATCH v2 1/2] watchdog: w83627hf_wdt: Add support for Nuvoton NCT6126 Paul Louvel
2026-07-06 10:30 ` sashiko-bot [this message]
2026-07-06 10:19 ` [PATCH v2 2/2] watchdog: w83627hf_wdt: Use WDOG_HW_RUNNING for running chip on boot Paul Louvel
2026-07-06 10:37 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260706103007.D4B561F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=paul.louvel@bootlin.com \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox