diff options
Diffstat (limited to 'drivers/char/ipmi/ipmi_smic_sm.c')
-rw-r--r-- | drivers/char/ipmi/ipmi_smic_sm.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/char/ipmi/ipmi_smic_sm.c b/drivers/char/ipmi/ipmi_smic_sm.c index add2aa2732f0..39d7e5ef1a2b 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,11 +80,17 @@ 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 |
83 | #define SMIC_TX_DATA_READY 0x40 | 87 | #define SMIC_TX_DATA_READY 0x40 |
88 | /* | ||
89 | * SMIC_SMI and SMIC_EVM_DATA_AVAIL are only used by | ||
90 | * a few systems, and then only by Systems Management | ||
91 | * Interrupts, not by the OS. Always ignore these bits. | ||
92 | * | ||
93 | */ | ||
84 | #define SMIC_SMI 0x10 | 94 | #define SMIC_SMI 0x10 |
85 | #define SMIC_EVM_DATA_AVAIL 0x08 | 95 | #define SMIC_EVM_DATA_AVAIL 0x08 |
86 | #define SMIC_SMS_DATA_AVAIL 0x04 | 96 | #define SMIC_SMS_DATA_AVAIL 0x04 |
@@ -364,8 +374,7 @@ static enum si_sm_result smic_event (struct si_sm_data *smic, long time) | |||
364 | switch (smic->state) { | 374 | switch (smic->state) { |
365 | case SMIC_IDLE: | 375 | case SMIC_IDLE: |
366 | /* in IDLE we check for available messages */ | 376 | /* in IDLE we check for available messages */ |
367 | if (flags & (SMIC_SMI | | 377 | if (flags & SMIC_SMS_DATA_AVAIL) |
368 | SMIC_EVM_DATA_AVAIL | SMIC_SMS_DATA_AVAIL)) | ||
369 | { | 378 | { |
370 | return SI_SM_ATTN; | 379 | return SI_SM_ATTN; |
371 | } | 380 | } |