summaryrefslogtreecommitdiff
path: root/util/isensor.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2016-08-24 05:56:37 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2016-08-24 05:56:37 +0200
commitdb5e8f26947114f06480dd22b9db7e22e50ee133 (patch)
treebb7418b545d295ea7cc4f5e7404d262e51082e0f /util/isensor.c
parent55adddbc16f65732b57ab8585c47001fced91d77 (diff)
Imported Upstream version 3.0.0upstream/3.0.0
Diffstat (limited to 'util/isensor.c')
-rw-r--r--util/isensor.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/util/isensor.c b/util/isensor.c
index a8694f9..a59e18b 100644
--- a/util/isensor.c
+++ b/util/isensor.c
@@ -175,6 +175,11 @@ int is_romley(int vend, int prod) {
return(1);
return(0);
}
+int is_grantley(int vend, int prod) {
+ if ((vend == VENDOR_INTEL) && (prod == 0x0071))
+ return(1);
+ return(0);
+}
int is_thurley(int vend, int prod) {
if ((vend == VENDOR_INTEL) && ((prod >= 0x003A) && (prod <= 0x0040)))
return(1);
@@ -247,7 +252,7 @@ char *decode_entity_id(int id) {
* Global Data
************************/
static char *progname = "isensor";
-static char *progver = "2.99";
+static char *progver = "3.00";
#ifdef WIN32
static char savefile[] = "%ipmiutildir%\\thresholds.cmd";
#else
@@ -295,6 +300,7 @@ static double sensor_hi_f = 0;
static double sensor_lo_f = 0;
static int fmBMC = 0;
static int fRomley = 0;
+static int fGrantley = 0;
static char chEol = '\n'; /* newline by default, space if option -w */
static uchar resid[2] = {0,0};
static uchar g_bus = PUBLIC_BUS;
@@ -2231,7 +2237,7 @@ decode_comp_reading(uchar type, uchar evtype, uchar num,
else istr = bitnum(b); /* ECC or other error */
break;
case 0x0D: /* drive slot - usually HSC sens_ownid == 0xc0 */
- if (fRomley) { /* evtype==0x6f, has both status and presence */
+ if (fRomley || fGrantley) { /* evtype==0x6f, has both status and presence */
if (reading & 0x02) istr = 12; /*Faulty*/
else if (reading & 0x80) istr = STR_REBUILDING; /*Rebuilding*/
else if (reading & 0x01) istr = 9; /*Present (OK)*/
@@ -3343,9 +3349,10 @@ int i_sensor(int argc, char **argv)
pstr = "BMC";
fmBMC = 0;
if (is_romley(vend_id,prod_id)) fRomley = 1;
+ if (is_grantley(vend_id,prod_id)) fGrantley = 1;
if (prod_id == 0x003E || fRomley) /*Urbanna NSN2U,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 { /* Other products */