All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Lee Jones" <lee@kernel.org>, linux-watchdog@vger.kernel.org
Subject: Re: [PATCH 1/6] watchdog: da9063: Stop ping worker on system suspend
Date: Thu, 03 Dec 2026 18:31:40 +0000	[thread overview]
Message-ID: <sashiko-outbox-248398@kernel.org> (raw)
In-Reply-To: <20261203173039.1142495-2-lee@kernel.org>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] watchdog: da9063: watchdog_dev_resume() ping violates 256 ms
  reset window
--

commit 49cf28fc9c5d60090a84633d01c89c66ae0ab80c
Author: Lee Jones <lee@kernel.org>

watchdog: da9063: Stop ping worker on system suspend

This commit calls watchdog_stop_ping_on_suspend() in da9063_wdt_probe()
before registering the watchdog device so the watchdog ping worker stops
during system suspend.

> diff --git a/drivers/watchdog/da9063_wdt.c b/drivers/watchdog/da9063_wdt.c
> index ca901a755b3a2..7ebf8d9e04ac1 100644
> --- a/drivers/watchdog/da9063_wdt.c
> +++ b/drivers/watchdog/da9063_wdt.c
> @@ -260,6 +260,8 @@ static int da9063_wdt_probe(struct platform_device *pdev)
>  		set_bit(WDOG_HW_RUNNING, &wdd->status);
>  	}
>  
> +	watchdog_stop_ping_on_suspend(wdd);
> +
>  	return devm_watchdog_register_device(dev, wdd);
>  }

[Severity: High]
Can this trigger a DA9063 hardware reset on resume when dlg,use-sw-pm is
enabled?

Setting WDOG_NO_PING_ON_SUSPEND registers watchdog_pm_notifier(), so
PM_POST_SUSPEND now runs watchdog_dev_resume() -> __watchdog_ping()
shortly after dpm_resume_end() calls da9063_wdt_resume().

When the watchdog is active or running from boot, da9063_wdt_resume()
restarts the timer via da9063_wdt_start() without updating
wd_data->last_hw_keepalive, starting a fresh 256 ms reset-protection
window.

Because __watchdog_ping() checks min_hw_heartbeat_ms against the stale
pre-suspend last_hw_keepalive, it invokes da9063_wdt_ping() within 256 ms
of the restart and causes the PMIC to reset the system.

Calling watchdog_set_last_hw_keepalive(wdd, 0) after da9063_wdt_start()
in da9063_wdt_resume() would record the restart timestamp so
watchdog_dev_resume() defers the ping until the 256 ms window expires.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261203173039.1142495-1-lee@kernel.org?part=1

  reply	other threads:[~2026-12-03 18:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03 17:30 [PATCH 0/6] watchdog: Fix High issues reported by Sashiko Lee Jones
2026-12-03 17:30 ` [PATCH 1/6] watchdog: da9063: Stop ping worker on system suspend Lee Jones
2026-12-03 18:31   ` sashiko-bot [this message]
2026-12-03 17:30 ` [PATCH 2/6] watchdog: dw_wdt: Guard shared IRQ handler during system suspend and resume Lee Jones
2026-12-03 19:00   ` sashiko-bot
2026-12-03 17:30 ` [PATCH 3/6] watchdog: npcm: Enable clock before checking running state in probe Lee Jones
2026-12-04  1:02   ` Guenter Roeck
2026-12-03 17:30 ` [PATCH 4/6] watchdog: sbsa: Evaluate MediaTek WS0 workaround after IRQ fallback Lee Jones
2026-12-04  1:03   ` Guenter Roeck
2026-12-03 17:30 ` [PATCH 5/6] watchdog: octeon-wdt: Serialise countdown and IRQ state with raw spinlock Lee Jones
2026-12-03 19:45   ` sashiko-bot
2026-12-03 17:30 ` [PATCH 6/6] watchdog: rzv2h: Avoid 32-bit overflow in max_hw_heartbeat_ms calculation Lee Jones
2026-12-04  1:04   ` Guenter Roeck
2026-12-04  1:08 ` [PATCH 0/6] watchdog: Fix High issues reported by Sashiko Guenter Roeck

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=sashiko-outbox-248398@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.