diff options
author | Corey Minyard <minyard@acm.org> | 2005-11-07 03:59:56 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 10:53:44 -0500 |
commit | c4edff1c19ef23e15aae64ca03f32c6719822d54 (patch) | |
tree | 06858fc7330b433b629827347c63ad890c715b3e /drivers/char/ipmi/ipmi_smic_sm.c | |
parent | 393d2cc354d150b8b4bb888a9da7db4c935e12bd (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.c | 6 |
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 add2aa2732f0..f17043da9dd5 100644 --- a/drivers/char/ipmi/ipmi_smic_sm.c +++ b/drivers/char/ipmi/ipmi_smic_sm.c | |||
@@ -43,6 +43,8 @@ | |||
43 | 43 | ||
44 | #include <linux/kernel.h> /* For printk. */ | 44 | #include <linux/kernel.h> /* For printk. */ |
45 | #include <linux/string.h> | 45 | #include <linux/string.h> |
46 | #include <linux/module.h> | ||
47 | #include <linux/moduleparam.h> | ||
46 | #include <linux/ipmi_msgdefs.h> /* for completion codes */ | 48 | #include <linux/ipmi_msgdefs.h> /* for completion codes */ |
47 | #include "ipmi_si_sm.h" | 49 | #include "ipmi_si_sm.h" |
48 | 50 | ||
@@ -56,6 +58,8 @@ | |||
56 | #define SMIC_DEBUG_ENABLE 1 | 58 | #define SMIC_DEBUG_ENABLE 1 |
57 | 59 | ||
58 | static int smic_debug = 1; | 60 | static int smic_debug = 1; |
61 | module_param(smic_debug, int, 0644); | ||
62 | MODULE_PARM_DESC(smic_debug, "debug bitmask, 1=enable, 2=messages, 4=states"); | ||
59 | 63 | ||
60 | enum smic_states { | 64 | enum smic_states { |
61 | SMIC_IDLE, | 65 | SMIC_IDLE, |
@@ -76,7 +80,7 @@ enum smic_states { | |||
76 | #define SMIC_MAX_ERROR_RETRIES 3 | 80 | #define SMIC_MAX_ERROR_RETRIES 3 |
77 | 81 | ||
78 | /* Timeouts in microseconds. */ | 82 | /* Timeouts in microseconds. */ |
79 | #define SMIC_RETRY_TIMEOUT 100000 | 83 | #define SMIC_RETRY_TIMEOUT 2000000 |
80 | 84 | ||
81 | /* SMIC Flags Register Bits */ | 85 | /* SMIC Flags Register Bits */ |
82 | #define SMIC_RX_DATA_READY 0x80 | 86 | #define SMIC_RX_DATA_READY 0x80 |