watchdog: mei_wdt: request stop on unregister
PATCH v2 1/1 watchdog: mei_wdt: request stop on unregister
From: Alexander Usyskin <[email protected]>
The MEI bus has a special behavior on suspend it destroys all the attached devices, this is due to the fact that also firmware context is not persistent across power flows.
If watchdog on MEI bus is ticking before suspending the firmware times out and reports that the OS is missing watchdog tick. Send the stop command to the firmware on watchdog unregistered to eliminate the false event on suspend.
This does not make the things worse from the user-space perspective as a user-space should re-open watchdog device after suspending before this patch.
---
V2: Update the commit message with better explanation
drivers/watchdog/mei_wdt.c | 1 + 1 file changed, 1 insertion(+)
drivers/watchdog/mei_wdt.c +1 -0
@@ -382,6 +382,7 @@ static int mei_wdt_register(struct mei_wdt *wdt)watchdog_set_drvdata (&wdt->wdd, wdt);watchdog_stop_on_reboot (&wdt->wdd); +watchdog_stop_on_unregister (&wdt->wdd); ret =watchdog_register_device (&wdt->wdd);if (ret)
Signature · 1 line
2.26.2
Quoted 14 lines · Tomas Winkler
From: Alexander Usyskin <[email protected]>
The MEI bus has a special behavior on suspend it destroys all the attached devices, this is due to the fact that also firmware context is not persistent across power flows.
If watchdog on MEI bus is ticking before suspending the firmware times out and reports that the OS is missing watchdog tick. Send the stop command to the firmware on watchdog unregistered to eliminate the false event on suspend.
This does not make the things worse from the user-space perspective as a user-space should re-open watchdog device after suspending before this patch.
Quoted 3 lines
Cc <[email protected]>Signed-off-by Alexander Usyskin <[email protected]>Signed-off-by Tomas Winkler <[email protected]>
Quoted 21 lines
---
V2: Update the commit message with better explanationdrivers/watchdog/mei_wdt.c | 1 + 1 file changed, 1 insertion(+)drivers/watchdog/mei_wdt.c +1
-0@@ -382,6 +382,7 @@ static int mei_wdt_register(struct mei_wdt *wdt)watchdog_set_drvdata (&wdt->wdd, wdt);watchdog_stop_on_reboot (&wdt->wdd); +watchdog_stop_on_unregister (&wdt->wdd); ret =watchdog_register_device (&wdt->wdd);if (ret)Signature · 1 line
2.26.2