aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorCorey Minyard <minyard@acm.org>2005-11-07 03:59:58 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 10:53:44 -0500
commitd5a2b89a4943b423b5b0a07783fee4e08424b0b2 (patch)
tree971f23005105d486d163a7a83feac4c1ffcac9a4 /drivers
parent21d6c542153c680f689a9badf5534bf27704350b (diff)
[PATCH] ipmi: more dell fixes
Make SMIC driver ignore EVT_AVAIL and SMS_ATN bits in flags register, as they're used by systems management interrupts, not the host OS. Make the OEM0 Data Available handler work for pre-IPMI 1.5 systems from Dell too. Without these two fixes, PowerEdge 2650 and other similar systems with SMIC may hang a process (modprobe or anything using /dev/ipmi0). 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')
-rw-r--r--drivers/char/ipmi/ipmi_si_intf.c23
-rw-r--r--drivers/char/ipmi/ipmi_smic_sm.c9
2 files changed, 23 insertions, 9 deletions
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index 204e2e987e90..df7dbbff57ae 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -2052,6 +2052,9 @@ static int oem_data_avail_to_receive_msg_avail(struct smi_info *smi_info)
2052 * IPMI Version = 0x51 IPMI 1.5 2052 * IPMI Version = 0x51 IPMI 1.5
2053 * Manufacturer ID = A2 02 00 Dell IANA 2053 * Manufacturer ID = A2 02 00 Dell IANA
2054 * 2054 *
2055 * Additionally, PowerEdge systems with IPMI < 1.5 may also assert
2056 * OEM0_DATA_AVAIL and needs to be treated as RECEIVE_MSG_AVAIL.
2057 *
2055 */ 2058 */
2056#define DELL_POWEREDGE_8G_BMC_DEVICE_ID 0x20 2059#define DELL_POWEREDGE_8G_BMC_DEVICE_ID 0x20
2057#define DELL_POWEREDGE_8G_BMC_DEVICE_REV 0x80 2060#define DELL_POWEREDGE_8G_BMC_DEVICE_REV 0x80
@@ -2061,13 +2064,19 @@ static void setup_dell_poweredge_oem_data_handler(struct smi_info *smi_info)
2061{ 2064{
2062 struct ipmi_device_id *id = &smi_info->device_id; 2065 struct ipmi_device_id *id = &smi_info->device_id;
2063 const char mfr[3]=DELL_IANA_MFR_ID; 2066 const char mfr[3]=DELL_IANA_MFR_ID;
2064 if (! memcmp(mfr, id->manufacturer_id, sizeof(mfr)) 2067 if (! memcmp(mfr, id->manufacturer_id, sizeof(mfr))) {
2065 && (id->device_id == DELL_POWEREDGE_8G_BMC_DEVICE_ID) 2068 if (id->device_id == DELL_POWEREDGE_8G_BMC_DEVICE_ID &&
2066 && (id->device_revision == DELL_POWEREDGE_8G_BMC_DEVICE_REV) 2069 id->device_revision == DELL_POWEREDGE_8G_BMC_DEVICE_REV &&
2067 && (id->ipmi_version == DELL_POWEREDGE_8G_BMC_IPMI_VERSION)) 2070 id->ipmi_version == DELL_POWEREDGE_8G_BMC_IPMI_VERSION) {
2068 { 2071 smi_info->oem_data_avail_handler =
2069 smi_info->oem_data_avail_handler = 2072 oem_data_avail_to_receive_msg_avail;
2070 oem_data_avail_to_receive_msg_avail; 2073 }
2074 else if (ipmi_version_major(id) < 1 ||
2075 (ipmi_version_major(id) == 1 &&
2076 ipmi_version_minor(id) < 5)) {
2077 smi_info->oem_data_avail_handler =
2078 oem_data_avail_to_receive_msg_avail;
2079 }
2071 } 2080 }
2072} 2081}
2073 2082
diff --git a/drivers/char/ipmi/ipmi_smic_sm.c b/drivers/char/ipmi/ipmi_smic_sm.c
index f17043da9dd5..39d7e5ef1a2b 100644
--- a/drivers/char/ipmi/ipmi_smic_sm.c
+++ b/drivers/char/ipmi/ipmi_smic_sm.c
@@ -85,6 +85,12 @@ enum smic_states {
85/* SMIC Flags Register Bits */ 85/* SMIC Flags Register Bits */
86#define SMIC_RX_DATA_READY 0x80 86#define SMIC_RX_DATA_READY 0x80
87#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 */
88#define SMIC_SMI 0x10 94#define SMIC_SMI 0x10
89#define SMIC_EVM_DATA_AVAIL 0x08 95#define SMIC_EVM_DATA_AVAIL 0x08
90#define SMIC_SMS_DATA_AVAIL 0x04 96#define SMIC_SMS_DATA_AVAIL 0x04
@@ -368,8 +374,7 @@ static enum si_sm_result smic_event (struct si_sm_data *smic, long time)
368 switch (smic->state) { 374 switch (smic->state) {
369 case SMIC_IDLE: 375 case SMIC_IDLE:
370 /* in IDLE we check for available messages */ 376 /* in IDLE we check for available messages */
371 if (flags & (SMIC_SMI | 377 if (flags & SMIC_SMS_DATA_AVAIL)
372 SMIC_EVM_DATA_AVAIL | SMIC_SMS_DATA_AVAIL))
373 { 378 {
374 return SI_SM_ATTN; 379 return SI_SM_ATTN;
375 } 380 }