]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/ipmi/ipmi_smic_sm.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb
[linux-2.6-omap-h63xx.git] / drivers / char / ipmi / ipmi_smic_sm.c
index add2aa2732f0c56c4324088a1a18b08ec08c7b9a..39d7e5ef1a2ba82ff6d9b3526f397b0e2184a550 100644 (file)
@@ -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,11 +80,17 @@ 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
 #define SMIC_TX_DATA_READY     0x40
+/*
+ * SMIC_SMI and SMIC_EVM_DATA_AVAIL are only used by
+ * a few systems, and then only by Systems Management
+ * Interrupts, not by the OS.  Always ignore these bits.
+ *
+ */
 #define SMIC_SMI               0x10
 #define SMIC_EVM_DATA_AVAIL    0x08
 #define SMIC_SMS_DATA_AVAIL    0x04
@@ -364,8 +374,7 @@ static enum si_sm_result smic_event (struct si_sm_data *smic, long time)
        switch (smic->state) {
        case SMIC_IDLE:
                /* in IDLE we check for available messages */
-               if (flags & (SMIC_SMI |
-                            SMIC_EVM_DATA_AVAIL | SMIC_SMS_DATA_AVAIL))
+               if (flags & SMIC_SMS_DATA_AVAIL)
                {
                        return SI_SM_ATTN;
                }