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:
Bo Yang
2017-11-23 15:29:28 +08:00
parent 26e3ae09aa
commit 84a1058529

View File

@@ -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;
}