Skip to contentSkip to conversation

watchdog: mei_wdt: request stop on reboot to prevent false positive event

watchdog Tomas Winkler 2 participants 2 messages Nov 8, 2016 – Nov 9, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

From: Alexander Usyskin <[email protected]>

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.

---
 drivers/watchdog/mei_wdt.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/watchdog/mei_wdt.c +2 -0
index e0af52265511..40953fe4db86 100644
@@ -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);
Signature · 1 line
2.7.4
maintainer Reviewed-by
#1 lore raw
Quoted 11 lines · Tomas Winkler

From: Alexander Usyskin <[email protected]>

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.

Quoted 3 lines
Quoted 18 lines
---
 drivers/watchdog/mei_wdt.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/watchdog/mei_wdt.c +2 -0
index e0af52265511..40953fe4db86 100644
@@ -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);