aboutsummaryrefslogtreecommitdiff
path: root/drivers/char/ipmi/ipmi_smic_sm.c
diff options
context:
space:
mode:
authorCorey Minyard <minyard@acm.org>2005-11-07 00:59:56 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 07:53:44 -0800
commitc4edff1c19ef23e15aae64ca03f32c6719822d54 (patch)
tree06858fc7330b433b629827347c63ad890c715b3e /drivers/char/ipmi/ipmi_smic_sm.c
parent393d2cc354d150b8b4bb888a9da7db4c935e12bd (diff)
[PATCH] ipmi: various si cleanup
A number of small changes for the various system interface drivers, consolidated from a number of patches from Matt Domsch. Clear B2H_ATN and drain the BMC message buffer on command timeout. This prevents further commands from failing after a timeout. Add bt_debug and smic_debug module parameters, expose them in sysfs. This lets you enable and disable debugging messages at runtime. Unsigned jiffies math in ipmi_si_intf.c causes a too-large value to be passed to ->event() after jiffies wrap-around. The BT driver had caught this, but didn't know how to fix it. Now all calls to ->event() use a sane value for time. Increase timeout for commands handed to the BT driver from 2 seconds to 5 seconds. This is necessary particularly when the previous command was a "Clear SEL", as that command completes, yet the BMC isn't really ready to handle another command yet. Silence BT debugging messages which were being printed on the console. Increase SMIC timeout form 1/10s to 2s. This is needed on Dell PowerEdge 2650 and PowerEdge 750 with ERA/O cards to allow commands to complete without timing out. Adds kcs_debug module param, to match behavior of BT and SMIC. This also prevents messages from being sent to the console unless explicitly requested. Signed-off-by: Matt Domsch <Matt_Domsch@dell.com> Signed-off-by: Corey Minyard <minyard@acm.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/ipmi/ipmi_smic_sm.c')
-rw-r--r--drivers/char/ipmi/ipmi_smic_sm.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/char/ipmi/ipmi_smic_sm.c b/drivers/char/ipmi/ipmi_smic_sm.c
index add2aa2732f..f17043da9dd 100644
--- a/drivers/char/ipmi/ipmi_smic_sm.c
+++ b/drivers/char/ipmi/ipmi_smic_sm.c
@@ -43,6 +43,8 @@
#include <linux/kernel.h> /* For printk. */
#include <linux/string.h>
+#include <linux/module.h>
+#include <linux/moduleparam.h>
#include <linux/ipmi_msgdefs.h> /* for completion codes */
#include "ipmi_si_sm.h"
@@ -56,6 +58,8 @@
#define SMIC_DEBUG_ENABLE 1
static int smic_debug = 1;
+module_param(smic_debug, int, 0644);
+MODULE_PARM_DESC(smic_debug, "debug bitmask, 1=enable, 2=messages, 4=states");
enum smic_states {
SMIC_IDLE,
@@ -76,7 +80,7 @@ enum smic_states {
#define SMIC_MAX_ERROR_RETRIES 3
/* Timeouts in microseconds. */
-#define SMIC_RETRY_TIMEOUT 100000
+#define SMIC_RETRY_TIMEOUT 2000000
/* SMIC Flags Register Bits */
#define SMIC_RX_DATA_READY 0x80