lkml.org 
[lkml]   [2017]   [Jan]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Stopping watchdog in watchdog driver remove functions
Hi Guenter,

> I noticed that several watchdog drivers stop the watchdog in trhe driver
> remove function.
> A non-exhaustive list of drivers doing that is
>
> drivers/watchdog/bcm7038_wdt.c
> drivers/watchdog/cadence_wdt.c
> drivers/watchdog/imgpdc_wdt.c
> drivers/watchdog/jz4740_wdt.c
> drivers/watchdog/kempld_wdt.c
> drivers/watchdog/max77620_wdt.c
> drivers/watchdog/moxart_wdt.c
> drivers/watchdog/sama5d4_wdt.c
> drivers/watchdog/tangox_wdt.c
> drivers/watchdog/tegra_wdt.c
>
> Since a watchdog has to be closed for its driver to be removable, one
> situation
> where a watchdog is still running on unload is where the watchdog was
> opened but
> not closed properly (eg by killing the watchdog application, or if the
> 'nowayout'
> flag is set).
>
> Given that, does it even make sense to stop the watchdog in the remove
> function ?
> Should it even be permitted ?

From an API point of view: if WDIOF_MAGICCLOSE is being used then the watchdog
_SHOULD_ continue to run when the watchdog was not properly closed (which
normally also results in a reboot of the system).
if WDIOF_MAGICCLOSE is not being used then closing the watchdog device means
that the driver needs to stop the watchdog.

Kind regards and happy new year to you all,
Wim.

\
 
 \ /
  Last update: 2017-01-01 12:14    [W:0.075 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site