Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Corey Minyard and committed by
Linus Torvalds
d5a2b89a 21d6c542

+23 -9
+16 -7
drivers/char/ipmi/ipmi_si_intf.c
··· 2052 2052 * IPMI Version = 0x51 IPMI 1.5 2053 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 2059 #define DELL_POWEREDGE_8G_BMC_DEVICE_ID 0x20 2057 2060 #define DELL_POWEREDGE_8G_BMC_DEVICE_REV 0x80 ··· 2064 2061 { 2065 2062 struct ipmi_device_id *id = &smi_info->device_id; 2066 2063 const char mfr[3]=DELL_IANA_MFR_ID; 2067 - if (! memcmp(mfr, id->manufacturer_id, sizeof(mfr)) 2068 - && (id->device_id == DELL_POWEREDGE_8G_BMC_DEVICE_ID) 2069 - && (id->device_revision == DELL_POWEREDGE_8G_BMC_DEVICE_REV) 2070 - && (id->ipmi_version == DELL_POWEREDGE_8G_BMC_IPMI_VERSION)) 2071 - { 2072 - smi_info->oem_data_avail_handler = 2073 - oem_data_avail_to_receive_msg_avail; 2064 + if (! memcmp(mfr, id->manufacturer_id, sizeof(mfr))) { 2065 + if (id->device_id == DELL_POWEREDGE_8G_BMC_DEVICE_ID && 2066 + id->device_revision == DELL_POWEREDGE_8G_BMC_DEVICE_REV && 2067 + id->ipmi_version == DELL_POWEREDGE_8G_BMC_IPMI_VERSION) { 2068 + smi_info->oem_data_avail_handler = 2069 + oem_data_avail_to_receive_msg_avail; 2070 + } 2071 + else if (ipmi_version_major(id) < 1 || 2072 + (ipmi_version_major(id) == 1 && 2073 + ipmi_version_minor(id) < 5)) { 2074 + smi_info->oem_data_avail_handler = 2075 + oem_data_avail_to_receive_msg_avail; 2076 + } 2074 2077 } 2075 2078 } 2076 2079
+7 -2
drivers/char/ipmi/ipmi_smic_sm.c
··· 85 85 /* SMIC Flags Register Bits */ 86 86 #define SMIC_RX_DATA_READY 0x80 87 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 94 #define SMIC_SMI 0x10 89 95 #define SMIC_EVM_DATA_AVAIL 0x08 90 96 #define SMIC_SMS_DATA_AVAIL 0x04 ··· 374 368 switch (smic->state) { 375 369 case SMIC_IDLE: 376 370 /* in IDLE we check for available messages */ 377 - if (flags & (SMIC_SMI | 378 - SMIC_EVM_DATA_AVAIL | SMIC_SMS_DATA_AVAIL)) 371 + if (flags & SMIC_SMS_DATA_AVAIL) 379 372 { 380 373 return SI_SM_ATTN; 381 374 }