Commit ec26d79f authored by Corey Minyard's avatar Corey Minyard Committed by Linus Torvalds

[PATCH] ipmi: fix watchdog so the device can be reopened on an unexpected close

If there is an unexpected close, still allow the watchdog interface to be
re-opened on the IPMI watchdog.
Signed-off-by: default avatarCorey Minyard <minyard@acm.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 35bc37a0
...@@ -709,11 +709,11 @@ static int ipmi_close(struct inode *ino, struct file *filep) ...@@ -709,11 +709,11 @@ static int ipmi_close(struct inode *ino, struct file *filep)
if (expect_close == 42) { if (expect_close == 42) {
ipmi_watchdog_state = WDOG_TIMEOUT_NONE; ipmi_watchdog_state = WDOG_TIMEOUT_NONE;
ipmi_set_timeout(IPMI_SET_TIMEOUT_NO_HB); ipmi_set_timeout(IPMI_SET_TIMEOUT_NO_HB);
clear_bit(0, &ipmi_wdog_open);
} else { } else {
printk(KERN_CRIT PFX "Unexpected close, not stopping watchdog!\n"); printk(KERN_CRIT PFX "Unexpected close, not stopping watchdog!\n");
ipmi_heartbeat(); ipmi_heartbeat();
} }
clear_bit(0, &ipmi_wdog_open);
} }
ipmi_fasync (-1, filep, 0); ipmi_fasync (-1, filep, 0);
......
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