On 2/19/19 9:00 AM, Michael Shych wrote:
+ watchdog_stop_on_reboot(&wdt->wdd);
+ watchdog_stop_on_unregister(&wdt->wdd);
+ watchdog_set_drvdata(&wdt->wdd, wdt);
+ rc = mlxreg_wdt_init_timeout(wdt, pdata);
+ if (rc)
+ goto register_error;
+
+ if ((pdata->features &
MLXREG_CORE_WD_FEATURE_START_AT_BOOT)) {
+ rc = mlxreg_wdt_start(&wdt->wdd);
+ if (rc)
+ goto register_error;
You do have to set HW_RUNNING here to inform the watchdog core that
the watchdog is running.
I understood from watchdog-kernel-api.txt document that this is not required
In our case.
" * WDOG_HW_RUNNING: Set by the watchdog driver if the hardware watchdog is
running. The bit must be set if the watchdog timer hardware can not be
stopped. The bit may also be set if the watchdog timer is running after
booting, before the watchdog device is opened. If set, the watchdog
infrastructure will send keepalives to the watchdog hardware while
WDOG_ACTIVE is not set."
The 2nd and 3rd sentences from this quotation aren't true for our watchdog.
Does it required anyway in spite that these cases are false?
I added set of WDOG_HW_RUNNING but I'm not sure that it's required.
So you want the watchdog to time out and cause a reboot after the initial
watchdog period has expired and the watchdog device has not been opened ?
Fine with me, just please add a respective comment into the driver.
Thanks,
Guenter