linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [watchdog] watchdog: mei_wdt: request stop on reboot to prevent false positive event
@ 2016-11-08 15:55 Tomas Winkler
  2016-11-09 14:47 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Tomas Winkler @ 2016-11-08 15:55 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck
  Cc: linux-watchdog, linux-kernel, Alexander Usyskin, stable, Tomas Winkler

From: Alexander Usyskin <alexander.usyskin@intel.com>

Systemd on reboot enables shutdown watchdog that leaves the watchdog
device open to ensure that even if power down process get stuck the
platform reboots nonetheless.
The iamt_wdt is an alarm-only watchdog and can't reboot system, but the
FW will generate an alarm event reboot was completed in time, as the
watchdog is not automatically disabled during power cycle.
So we should request stop watchdog on reboot to eliminate wrong alarm
from the FW.

Cc: <stable@vger.kernel.org>
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
---
 drivers/watchdog/mei_wdt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/watchdog/mei_wdt.c b/drivers/watchdog/mei_wdt.c
index e0af52265511..40953fe4db86 100644
--- a/drivers/watchdog/mei_wdt.c
+++ b/drivers/watchdog/mei_wdt.c
@@ -389,6 +389,8 @@ static int mei_wdt_register(struct mei_wdt *wdt)
 	wdt->wdd.max_timeout = MEI_WDT_MAX_TIMEOUT;
 
 	watchdog_set_drvdata(&wdt->wdd, wdt);
+	watchdog_stop_on_reboot(&wdt->wdd);
+
 	ret = watchdog_register_device(&wdt->wdd);
 	if (ret) {
 		dev_err(dev, "unable to register watchdog device = %d.\n", ret);
-- 
2.7.4

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

* Re: [watchdog] watchdog: mei_wdt: request stop on reboot to prevent false positive event
  2016-11-08 15:55 [watchdog] watchdog: mei_wdt: request stop on reboot to prevent false positive event Tomas Winkler
@ 2016-11-09 14:47 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2016-11-09 14:47 UTC (permalink / raw)
  To: Tomas Winkler, Wim Van Sebroeck
  Cc: linux-watchdog, linux-kernel, Alexander Usyskin, stable

On 11/08/2016 07:55 AM, Tomas Winkler wrote:
> From: Alexander Usyskin <alexander.usyskin@intel.com>
>
> Systemd on reboot enables shutdown watchdog that leaves the watchdog
> device open to ensure that even if power down process get stuck the
> platform reboots nonetheless.
> The iamt_wdt is an alarm-only watchdog and can't reboot system, but the
> FW will generate an alarm event reboot was completed in time, as the
> watchdog is not automatically disabled during power cycle.
> So we should request stop watchdog on reboot to eliminate wrong alarm
> from the FW.
>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  drivers/watchdog/mei_wdt.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/watchdog/mei_wdt.c b/drivers/watchdog/mei_wdt.c
> index e0af52265511..40953fe4db86 100644
> --- a/drivers/watchdog/mei_wdt.c
> +++ b/drivers/watchdog/mei_wdt.c
> @@ -389,6 +389,8 @@ static int mei_wdt_register(struct mei_wdt *wdt)
>  	wdt->wdd.max_timeout = MEI_WDT_MAX_TIMEOUT;
>
>  	watchdog_set_drvdata(&wdt->wdd, wdt);
> +	watchdog_stop_on_reboot(&wdt->wdd);
> +
>  	ret = watchdog_register_device(&wdt->wdd);
>  	if (ret) {
>  		dev_err(dev, "unable to register watchdog device = %d.\n", ret);
>

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

end of thread, other threads:[~2016-11-09 14:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-08 15:55 [watchdog] watchdog: mei_wdt: request stop on reboot to prevent false positive event Tomas Winkler
2016-11-09 14:47 ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).