From: Guenter Roeck <linux@roeck-us.net>
To: Qiang Zhao <qiang.zhao@nxp.com>
Cc: wim@linux-watchdog.org, linux-watchdog@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] watchdog: stop wdd when watchdog hw running in reboot_notifier
Date: Sat, 23 Jan 2021 09:26:09 -0800 [thread overview]
Message-ID: <20210123172609.GA56545@roeck-us.net> (raw)
In-Reply-To: <20210114082651.17162-1-qiang.zhao@nxp.com>
On Thu, Jan 14, 2021 at 04:26:51PM +0800, Qiang Zhao wrote:
> From: Zhao Qiang <qiang.zhao@nxp.com>
>
> In watchdog_reboot_notifier, wdd should be stopped when the device
> is in hw_running state
>
> Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/watchdog/watchdog_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/watchdog_core.c b/drivers/watchdog/watchdog_core.c
> index 861daf4..ec670cc 100644
> --- a/drivers/watchdog/watchdog_core.c
> +++ b/drivers/watchdog/watchdog_core.c
> @@ -154,7 +154,7 @@ static int watchdog_reboot_notifier(struct notifier_block *nb,
>
> wdd = container_of(nb, struct watchdog_device, reboot_nb);
> if (code == SYS_DOWN || code == SYS_HALT) {
> - if (watchdog_active(wdd)) {
> + if (watchdog_active(wdd) || watchdog_hw_running(wdd)) {
> int ret;
>
> ret = wdd->ops->stop(wdd);
prev parent reply other threads:[~2021-01-23 17:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-14 8:26 Qiang Zhao
2021-01-23 17:26 ` Guenter Roeck [this message]
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=20210123172609.GA56545@roeck-us.net \
--to=linux@roeck-us.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=qiang.zhao@nxp.com \
--cc=wim@linux-watchdog.org \
/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
all inboxes | Powered by JetHome®