summaryrefslogtreecommitdiff
path: root/util/oem_supermicro.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-02-24 21:18:20 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-02-24 21:18:20 +0100
commit7a40b1039a0cef3c47c75260f47aba0548c1cdbb (patch)
tree9cc82aefd88f309aea07c58dbd6056922bdbea9c /util/oem_supermicro.c
parentf504e2f8269ff2f133f0700c8ad03ad4f05df49a (diff)
parente6806f1d217e07f52759e4fa1c792d1fe02f0d50 (diff)
Merge tag 'upstream/3.0.2'
Upstream version 3.0.2
Diffstat (limited to 'util/oem_supermicro.c')
-rw-r--r--util/oem_supermicro.c36
1 files changed, 20 insertions, 16 deletions
diff --git a/util/oem_supermicro.c b/util/oem_supermicro.c
index f3e42dd..d1d1da7 100644
--- a/util/oem_supermicro.c
+++ b/util/oem_supermicro.c
@@ -68,7 +68,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
void set_loglevel(int level); /*prototype */
extern char fsm_debug; /*mem_if.c*/
-static char * progver = "3.01";
+static char * progver = "3.02";
static char * progname = "ismcoem";
static int verbose = 0;
static char fdebug = 0;
@@ -463,32 +463,32 @@ int decode_sensor_supermicro(uchar *sdr,uchar *reading,char *pstring, int slen)
//if (dbg) printf("supermicro %x sensor reading %x\n",stype,reading);
rv = 0;
switch(bval) {
- case 0x0000: pstr = "00_Low"; break;
- case 0x0001: pstr = "01_Medium"; break;
- case 0x0002: pstr = "02_High"; break;
- case 0x0004: pstr = "04_Overheat"; break;
- case 0x0007: pstr = "07_Not Installed"; break;
+ case 0x0000: pstr = "Low"; break;
+ case 0x0001: pstr = "Medium"; break;
+ case 0x0002: pstr = "High"; break;
+ case 0x0004: pstr = "Overheat"; break;
+ case 0x0007: pstr = "Not Installed"; break;
default: rv = -1; break;
}
break;
case 0x08: /* Power Supply Status (Full/Discrete) Table 42-3 */
rv = 0;
switch(bval) {
- case 0x00: pstr = "00_Absent"; break; /*bit 0*/
- case 0x01: pstr = "01_Present"; break; /*bit 0*/
- case 0x02: pstr = "02_Failure"; break; /*bit 1*/
- case 0x04: pstr = "04_Predict Fail"; break; /*bit 2*/
- case 0x08: pstr = "08_Input Lost"; break; /*bit 3*/
+ case 0x00: pstr = "Absent"; break; /*bit 0*/
+ case 0x01: pstr = "Present"; break; /*bit 0*/
+ case 0x02: pstr = "Failure"; break; /*bit 1*/
+ case 0x04: pstr = "Predict Fail"; break; /*bit 2*/
+ case 0x08: pstr = "Input Lost"; break; /*bit 3*/
default: rv = -1; break;
}
break;
case 0x0D: /* HDD Status (Full/Discrete) Table 42-3 */
rv = 0;
switch(bval) {
- case 0x00: pstr = "00_Absent"; break; /*bit 0*/
- case 0x01: pstr = "01_Present"; break; /*bit 0*/
- case 0x02: pstr = "02_Failure"; break; /*bit 1*/
- case 0x04: pstr = "04_Predict Fail"; break; /*bit 2*/
+ case 0x00: pstr = "Absent"; break; /*bit 0*/
+ case 0x01: pstr = "Present"; break; /*bit 0*/
+ case 0x02: pstr = "Failure"; break; /*bit 1*/
+ case 0x04: pstr = "Predict Fail"; break; /*bit 2*/
default: rv = -1; break;
}
break;
@@ -520,6 +520,7 @@ int decode_mem_supermicro(int prod, uchar b2, uchar b3, char *desc, int *psz)
dimm = bdata % 10;
#endif
/* ver 0 previous SuperMicro firmware returned all zeros here.
+ * Memory #00 Correctable ECC, <pstr> 6f [00 00 00]
* ver 1 returns data3 with some info (X9)
* ver 2 returns data2 with some info (X9,X10)
* There have been bugs in these SuperMicro events, but this
@@ -548,7 +549,10 @@ int decode_mem_supermicro(int prod, uchar b2, uchar b3, char *desc, int *psz)
if (pair < 0) pair = 0;
if (pair > NPAIRS) pair = NPAIRS - 1;
dimm = (bdata & 0x0F) - 9; /*0x0A=dimmX1, 0x0B=dimmX2*/
- n = sprintf(desc,"P%d_DIMM%c%d",cpu,rgpair[pair],dimm);
+ if (dimm < 0)
+ n = sprintf(desc,"unknown DIMM"); /* was ver 0 */
+ else
+ n = sprintf(desc,"P%d_DIMM%c%d",cpu,rgpair[pair],dimm);
}
#ifdef DMIOK
/* Use DMI if we get confirmation about cpu/dimm indices. */