Re: What to set in struct watchdog_device::bootstatus?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/9/19 12:25 PM, Uwe Kleine-König wrote:
Hello Guenter,

On Wed, Feb 20, 2019 at 09:14:08PM +0100, Uwe Kleine-König wrote:
In a custom kernel patch stack I found a patch that uses (apart from
WDIOF_CARDRESET also) WDIOF_POWERUNDER and WDIOF_EXTERN1 to
differentiate the different reset causes. Now that you told using this
is wrong, I wonder how these are supposed to be used instead; and there
are a few more that according to
Documentation/watchdog/watchdog-kernel-api.txt might be used to set
bootstatus. Are these a relic? What do these signal?

I'm still interested in an answer here. While it is currently not
possible to "fix" the custom kernel as some other software that is
already shipping depends on this. Still I'd like to know the details
here to maybe suggest an alternative for the longterm future.

IMHO there is a patch opportunity waiting to improve the documenation
:-) Or maybe even change watchdog_get_status() to ensure that only
WDIOF_CARDRESET, WDIOF_MAGICCLOSE and WDIOF_KEEPALIVEPING can be set?


The basic problem, as I see it, is that the bits were defined a long time
ago as standard API, even tough they really only apply to a small subset
of watchdog cards. Personally I tend to believe that any set of bits
would be insufficient. Maybe it should have been a string. Either case,
I don't believe in forcing more or less random reboot reasons into a
given set of bits. On the other side I also don't see the point in
arbitrarily limiting the bit values returned by WDIOC_GETSTATUS.
With that, my general approach would be some kind of report-what-makes-sense
approach. But using WDIOF_POWERUNDER for "power cycle" just goes a bit too
far.

Thanks,
Guenter



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux