From: Guenter Roeck <linux@roeck-us.net>
To: Wim Van Sebroeck <wim@iguana.be>
Cc: "linux-watchdog@vger.kernel.org" <linux-watchdog@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Laxman Dewangan <ldewangan@nvidia.com>,
Mans Rullgard <mans@mansr.com>,
Justin Chen <justinpopo6@gmail.com>,
Wenyou Yang <wenyou.yang@atmel.com>,
Naidu Tellapati <naidu.tellapati@gmail.com>
Subject: Re: Stopping watchdog in watchdog driver remove functions
Date: Sun, 1 Jan 2017 08:52:09 -0800 [thread overview]
Message-ID: <a7f0a6b8-d572-99de-a5ba-0f448b82a1ab@roeck-us.net> (raw)
In-Reply-To: <20170101111421.GA9695@spo001.leaseweb.nl>
On 01/01/2017 03:14 AM, Wim Van Sebroeck wrote:
> 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.
>
All the above have WDIOF_MAGICCLOSE set. Does that mean they should not stop
the watchdog on remove ?
Happy new year everyone !
Guenter
prev parent reply other threads:[~2017-01-01 16:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-31 19:44 Guenter Roeck
2017-01-01 11:14 ` Wim Van Sebroeck
2017-01-01 15:24 ` Andy Shevchenko
2017-01-01 16:52 ` Guenter Roeck [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a7f0a6b8-d572-99de-a5ba-0f448b82a1ab@roeck-us.net \
--to=linux@roeck-us.net \
--cc=justinpopo6@gmail.com \
--cc=ldewangan@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=mans@mansr.com \
--cc=naidu.tellapati@gmail.com \
--cc=wenyou.yang@atmel.com \
--cc=wim@iguana.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®