Commit 266aa1c4 authored by Wim Van Sebroeck's avatar Wim Van Sebroeck

[WATCHDOG] driver-for-ibm-automatic-server-restart-watchdog-fix2.patch

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: default avatarWim Van Sebroeck <wim@iguana.be>
parent cd7b8007
...@@ -246,7 +246,7 @@ static int asr_ioctl(struct inode *inode, struct file *file, ...@@ -246,7 +246,7 @@ static int asr_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
static const struct watchdog_info ident = { static const struct watchdog_info ident = {
.options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | .options = WDIOF_KEEPALIVEPING |
WDIOF_MAGICCLOSE, WDIOF_MAGICCLOSE,
.identity = "IBM ASR" .identity = "IBM ASR"
}; };
...@@ -268,14 +268,9 @@ static int asr_ioctl(struct inode *inode, struct file *file, ...@@ -268,14 +268,9 @@ static int asr_ioctl(struct inode *inode, struct file *file,
return 0; return 0;
/* /*
* The hardware has a fixed timeout value, so WDIOC_SETTIMEOUT * The hardware has a fixed timeout value, so no WDIOC_SETTIMEOUT
* is a noop and WDIOC_GETTIMEOUT always returns 256. * and WDIOC_GETTIMEOUT always returns 256.
*/ */
case WDIOC_SETTIMEOUT:
if (get_user(heartbeat, p))
return -EFAULT;
/* Fall */
case WDIOC_GETTIMEOUT: case WDIOC_GETTIMEOUT:
heartbeat = 256; heartbeat = 256;
return put_user(heartbeat, p); return put_user(heartbeat, p);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment