summaryrefslogtreecommitdiff
path: root/util/isensor.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2019-12-23 07:43:17 +0100
committerJörg Frings-Fürst <debian@jff.email>2019-12-23 07:43:17 +0100
commit4d04d317f1e2c8e46b8fc04b4a20689da471a5d3 (patch)
tree20772efc19de68d81ac4c972cd1e232b75ab9962 /util/isensor.c
parent3d8ccff2a698e62e112f58f8c329b77ae71b8cbd (diff)
parent23a457acde5ee92ed3a20e84c201edfa4bd5a107 (diff)
Merge branch 'release/debian/3.1.5-1'debian/3.1.5-1
Diffstat (limited to 'util/isensor.c')
-rw-r--r--util/isensor.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/util/isensor.c b/util/isensor.c
index df4a911..48755b7 100644
--- a/util/isensor.c
+++ b/util/isensor.c
@@ -80,6 +80,7 @@
* fixup in decoding Proc,PS Comp readings
* 01/25/08 ARCress v2.7 allow float input with -u thresholds,
* add -p persist logic for -u thresholds.
+ * 09/20/19 ARCress v3.15 workaround for Pigeon Point bad sa in SDR
*/
/*M*
Copyright (c) 2002-2006 Intel Corporation.
@@ -259,7 +260,7 @@ char *decode_entity_id(int id) {
extern char * progver; /*from ipmiutil.c*/
static char * progname = "ipmiutil sensor";
#else
-static char * progver = "3.08";
+static char * progver = "3.15";
static char * progname = "isensor";
#endif
#ifdef WIN32
@@ -284,6 +285,7 @@ static int fdoloop = 0; /* =1 if user specified number of loops */
static int fpicmg = 0;
static int fchild = 0; /* =1 show child SDRs */
static int fset_mc = 0; /* =1 -m to set_mc */
+static int fbadsdr = 0; /* =1 to ignore bad SDR mc */
static int fdump = 0;
static int frestore = 0;
static int fjumpstart = 0;
@@ -1034,7 +1036,7 @@ GetSensorReading(uchar sens_num, void *psdr, uchar *sens_data)
uchar lun = 0;
uchar chan = 0;
- if (psdr != NULL) {
+ if (psdr != NULL && fbadsdr == 0) {
sdr = (SDR02REC *)psdr;
mc = sdr->sens_ownid;
if (mc != BMC_SA) { /* not BMC, e.g. HSC or ME sensor */
@@ -2760,7 +2762,7 @@ ShowSDR(char *tag, uchar *sdr)
idstr[ilen] = 0; /* stringify */
if ((sdr02->sens_capab & 0x40) == 0) brearm = 'm'; /*manual rearm*/
else brearm = 'a'; /*automatic rearm*/
- if (fdebug) printf("ilen=%d, istr0=%c, sizeof=%lu, s0=%x\n",
+ if (fdebug) printf("ilen=%d, istr0=%c, sizeof=%zu, s0=%x\n",
ilen,idstr[0],sizeof(SDR02REC),sdr[ioff]);
memset(sens,0,sizeof(sens));
rc = GetSensorReading(sdr02->sens_num,sdr02,sens);
@@ -2936,7 +2938,7 @@ ShowSDR(char *tag, uchar *sdr)
if (ilen >= sizeof(idstr)) ilen = sizeof(idstr) - 1;
memcpy(idstr,&sdr[ioff],ilen);
idstr[ilen] = 0; /* stringify */
- if (fdebug) printf("ilen=%d, istr0=%c, sizeof=%lu, s0=%x\n",
+ if (fdebug) printf("ilen=%d, istr0=%c, sizeof=%zu, s0=%x\n",
ilen,idstr[0],sizeof(SDR11REC),sdr[ioff]);
printf("%s", tag);
if (fsimple)
@@ -2966,7 +2968,7 @@ ShowSDR(char *tag, uchar *sdr)
if (ilen >= sizeof(idstr)) ilen = sizeof(idstr) - 1;
memcpy(idstr,&sdr[ioff],ilen);
idstr[ilen] = 0; /* stringify */
- if (fdebug) printf("ilen=%d, istr0=%c, sizeof=%lu, s0=%x\n",
+ if (fdebug) printf("ilen=%d, istr0=%c, sizeof=%zu, s0=%x\n",
ilen,idstr[0],sizeof(SDR12REC),sdr[ioff]);
printf("%s", tag);
if (fsimple)
@@ -3484,9 +3486,11 @@ int i_sensor(int argc, char **argv)
if (is_grantley(vend_id,prod_id)) fGrantley = 1;
if (prod_id == 0x003E || fRomley || fGrantley) /*Urbanna,CG2100*/
set_max_kcs_loops(URNLOOPS); /*longer KCS timeout*/
- } else if ((vend_id == VENDOR_SUPERMICRO)
+ } else if ((vend_id == VENDOR_SUPERMICRO)
|| (vend_id == VENDOR_SUPERMICROX)) {
set_max_kcs_loops(URNLOOPS); /*longer KCS timeout*/
+ } else if (vend_id == 16394) { /*Pigeon Point*/
+ fbadsdr = 1; /* SDR has bad sa/mc value, so ignore it */
} else { /* Other products */
pstr = "BMC";
fmBMC = 0;