lkml.org 
[lkml]   [2002]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: WatchDog Driver Updates

On Sun, 7 Apr 2002, Alan Cox wrote:

> > > 5. WDIOC_GETSTATUS is supposed to return the WDIOF_* flags. Returning
> > > "watchdog active" as bit 0 causes it to indicate WDIOF_OVERHEAT.
> >
> > Hmm...I'm not seeing any standards here. Some drivers would just send
>
> Documentation/* in current -ac

2.4.19-pre5-ac3

Right, Documentation/watchdog.txt:
The i810 TCO watchdog driver also implements the WDIOC_GETSTATUS and
WDIOC_GETBOOTSTATUS ioctl()s. WDIOC_GETSTATUS returns the actual counter value
and WDIOC_GETBOOTSTATUS returns the value of TCO2 Status Register (see Intel's
documentation for the 82801AA and 82801AB datasheet).

Documentation/watchdog-api.txt lists each driver and how the ones that
implement GETSTATUS do so in a 'silly' manner. While it also does mention
how cards are supposed to return WDIOF_* (and list supported flags in the
options), it also shows how all of 3 out of 20 watchdog drivers actually
follow that convention. 7 return the number 1, 1 returns the number of ticks,
and 1 returns whether the card is enabled or disabled. So following the
standards embodied in the code, every driver should just return 1 ;-).

Ah-ha, the crown jewels!
Documentation/pcwd-watchdog.txt:
WDIOC_GETSTATUS
This returns the status of the card, with the bits of
WDIOF_* bitwise-anded into the value. (The comments
are in linux/pcwd.h)
Although, this is hidden away in a driver specific file (and even references
a file which no longer exists). I guess I'll clean all this up in my next
patch.

Regards,
Rob Radez


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:22    [W:0.057 / U:6.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site