Linux-Watchdog Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] watchdog: stop wdd when watchdog hw running in reboot_notifier
@ 2021-01-14  8:26 Qiang Zhao
  2021-01-23 17:26 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Qiang Zhao @ 2021-01-14  8:26 UTC (permalink / raw)
  To: wim, linux; +Cc: linux-watchdog, linux-kernel, Zhao Qiang

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>
---
 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);
-- 
2.7.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] watchdog: stop wdd when watchdog hw running in reboot_notifier
  2021-01-14  8:26 [PATCH] watchdog: stop wdd when watchdog hw running in reboot_notifier Qiang Zhao
@ 2021-01-23 17:26 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2021-01-23 17:26 UTC (permalink / raw)
  To: Qiang Zhao; +Cc: wim, linux-watchdog, linux-kernel

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);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-14  8:26 [PATCH] watchdog: stop wdd when watchdog hw running in reboot_notifier Qiang Zhao
2021-01-23 17:26 ` Guenter Roeck

Linux-Watchdog Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-watchdog/0 linux-watchdog/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-watchdog linux-watchdog/ https://lore.kernel.org/linux-watchdog \
		linux-watchdog@vger.kernel.org
	public-inbox-index linux-watchdog

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-watchdog


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git