mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
watchdog: meson-wdt: fix reboot notify to stop reset
PD#154679: watchdog: meson-wdt: fix reboot notify to stop reset In some cases, the watchdog reboot notify will not disable watchdog. The watchdog reset workqueue will continue work in the first cpu that invokes panic(oops). So the hardware watchdog will not reboot. Cancel the delayed workqueue to stop reset the watchdog in reboot notify. And move the print message to the right location. Change-Id: I7d85d49f2f5d780f7c5f2612e64494e77957dfff Signed-off-by: Bo Yang <bo.yang@amlogic.com>
This commit is contained in:
@@ -268,11 +268,13 @@ static int aml_wtd_reboot_notify(struct notifier_block *nb,
|
||||
{
|
||||
struct aml_wdt_dev *wdev;
|
||||
|
||||
wdev = container_of(nb, struct aml_wdt_dev, reboot_notifier);
|
||||
if (event == SYS_DOWN || event == SYS_HALT) {
|
||||
wdev = container_of(nb, struct aml_wdt_dev, reboot_notifier);
|
||||
disable_watchdog(wdev);
|
||||
pr_info("disable watchdog\n");
|
||||
}
|
||||
pr_info("disable watchdog\n");
|
||||
if (wdev->reset_watchdog_method == 1)
|
||||
cancel_delayed_work(&wdev->boot_queue);
|
||||
return NOTIFY_OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user