Skip to content

Commit

Permalink
[WATCHDOG] driver-for-ibm-automatic-server-restart-watchdog-fix2.patch
Browse files Browse the repository at this point in the history
The device/watchdog has a fixed timeout/heartbeat.
So we don't support the WDIOC_SETTIMEOUT ioctl call
and we also may not set the WDIOF_SETTIMEOUT flag.

Cc: Andrey Panin <pazke@donpac.ru>
Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
  • Loading branch information
Wim Van Sebroeck committed Sep 11, 2005
1 parent cd7b800 commit 266aa1c
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions drivers/char/watchdog/ibmasr.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ static int asr_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
{
static const struct watchdog_info ident = {
.options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT |
.options = WDIOF_KEEPALIVEPING |
WDIOF_MAGICCLOSE,
.identity = "IBM ASR"
};
Expand All @@ -268,14 +268,9 @@ static int asr_ioctl(struct inode *inode, struct file *file,
return 0;

/*
* The hardware has a fixed timeout value, so WDIOC_SETTIMEOUT
* is a noop and WDIOC_GETTIMEOUT always returns 256.
* The hardware has a fixed timeout value, so no WDIOC_SETTIMEOUT
* and WDIOC_GETTIMEOUT always returns 256.
*/
case WDIOC_SETTIMEOUT:
if (get_user(heartbeat, p))
return -EFAULT;
/* Fall */

case WDIOC_GETTIMEOUT:
heartbeat = 256;
return put_user(heartbeat, p);
Expand Down

0 comments on commit 266aa1c

Please sign in to comment.