aboutsummaryrefslogtreecommitdiff
path: root/drivers/char/ipmi/ipmi_si_intf.c
diff options
context:
space:
mode:
authorCorey Minyard <cminyard@mvista.com>2007-10-18 03:07:09 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-18 14:37:32 -0700
commitfcfa4724116589d6a5fac92af410b6f12d41b5bb (patch)
treee709e6e51e8475836f56478a4645bbeeb8daf134 /drivers/char/ipmi/ipmi_si_intf.c
parent650dd0c7faf8126aaa261833dc9171a070deeaf3 (diff)
IPMI: add polled interface
Currently the IPMI watchdog timer sets the watchdog timeout on a panic, but it doesn't actually poll the interface to make sure the message goes out. Add an interface for polling the IPMI driver, and add code to the IPMI watchdog timer to poll the interface when the timer is set from a panic. Signed-off-by: Corey Minyard <cminyard@mvista.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/ipmi/ipmi_si_intf.c')
-rw-r--r--drivers/char/ipmi/ipmi_si_intf.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index e018932af79..da09eb0ef78 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -675,7 +675,8 @@ static void handle_transaction_done(struct smi_info *smi_info)
}
/* Called on timeouts and events. Timeouts should pass the elapsed
- time, interrupts should pass in zero. */
+ time, interrupts should pass in zero. Must be called with
+ si_lock held and interrupts disabled. */
static enum si_sm_result smi_event_handler(struct smi_info *smi_info,
int time)
{
@@ -892,13 +893,16 @@ static int ipmi_thread(void *data)
static void poll(void *send_info)
{
struct smi_info *smi_info = send_info;
+ unsigned long flags;
/*
* Make sure there is some delay in the poll loop so we can
* drive time forward and timeout things.
*/
udelay(10);
+ spin_lock_irqsave(&smi_info->si_lock, flags);
smi_event_handler(smi_info, 10);
+ spin_unlock_irqrestore(&smi_info->si_lock, flags);
}
static void request_events(void *send_info)