NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-amd64/46833: NetBSD 6.0_BETA2 shutdowns under load



hi,

does the attached patch make sense?

totally untested because i have no access to ipmi-capable systems.

YAMAMOTO Takashi
Index: ipmi.c
===================================================================
RCS file: /cvsroot/src/sys/arch/x86/x86/ipmi.c,v
retrieving revision 1.54
diff -u -p -r1.54 ipmi.c
--- ipmi.c      19 Mar 2013 06:34:28 -0000      1.54
+++ ipmi.c      7 May 2013 10:58:48 -0000
@@ -146,7 +146,11 @@ int        ipmi_enabled = 0;
 
 #define IPMI_ENTITY_PWRSUPPLY          0x0A
 
-#define IPMI_INVALID_SENSOR            (1L << 5)
+#define IPMI_SENSOR_SCANNING_ENABLED   (1L << 6)
+#define IPMI_SENSOR_UNAVAILABLE                (1L << 5)
+#define IPMI_INVALID_SENSOR_P(x) \
+       (((x) & (IPMI_SENSOR_SCANNING_ENABLED|IPMI_SENSOR_UNAVAILABLE)) \
+       == IPMI_SENSOR_SCANNING_ENABLED)
 
 #define IPMI_SDR_TYPEFULL              1
 #define IPMI_SDR_TYPECOMPACT           2
@@ -1716,7 +1720,7 @@ read_sensor(struct ipmi_softc *sc, struc
            s1->m, s1->m_tolerance, s1->b, s1->b_accuracy, s1->rbexp, 
s1->linear);
        dbg_printf(10, "values=%.2x %.2x %.2x %.2x %s\n",
            data[0],data[1],data[2],data[3], edata->desc);
-       if (data[1] & IPMI_INVALID_SENSOR) {
+       if (IPMI_INVALID_SENSOR_P(data[1])) {
                /* Check if sensor is valid */
                edata->state = ENVSYS_SINVALID;
        } else {


Home | Main Index | Thread Index | Old Index