Commit d5a2b89a authored by Corey Minyard's avatar Corey Minyard Committed by Linus Torvalds
Browse files

[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: default avatarMatt Domsch <Matt_Domsch@dell.com>
Signed-off-by: default avatarCorey Minyard <minyard@acm.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 21d6c542
......@@ -2052,6 +2052,9 @@ static int oem_data_avail_to_receive_msg_avail(struct smi_info *smi_info)
* IPMI Version = 0x51 IPMI 1.5
* Manufacturer ID = A2 02 00 Dell IANA
*
* Additionally, PowerEdge systems with IPMI < 1.5 may also assert
* OEM0_DATA_AVAIL and needs to be treated as RECEIVE_MSG_AVAIL.
*
*/
#define DELL_POWEREDGE_8G_BMC_DEVICE_ID 0x20
#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)
{
struct ipmi_device_id *id = &smi_info->device_id;
const char mfr[3]=DELL_IANA_MFR_ID;
if (! memcmp(mfr, id->manufacturer_id, sizeof(mfr))
&& (id->device_id == DELL_POWEREDGE_8G_BMC_DEVICE_ID)
&& (id->device_revision == DELL_POWEREDGE_8G_BMC_DEVICE_REV)
&& (id->ipmi_version == DELL_POWEREDGE_8G_BMC_IPMI_VERSION))
{
smi_info->oem_data_avail_handler =
oem_data_avail_to_receive_msg_avail;
if (! memcmp(mfr, id->manufacturer_id, sizeof(mfr))) {
if (id->device_id == DELL_POWEREDGE_8G_BMC_DEVICE_ID &&
id->device_revision == DELL_POWEREDGE_8G_BMC_DEVICE_REV &&
id->ipmi_version == DELL_POWEREDGE_8G_BMC_IPMI_VERSION) {
smi_info->oem_data_avail_handler =
oem_data_avail_to_receive_msg_avail;
}
else if (ipmi_version_major(id) < 1 ||
(ipmi_version_major(id) == 1 &&
ipmi_version_minor(id) < 5)) {
smi_info->oem_data_avail_handler =
oem_data_avail_to_receive_msg_avail;
}
}
}
......
......@@ -85,6 +85,12 @@ enum smic_states {
/* 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
......@@ -368,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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment