summaryrefslogtreecommitdiff
path: root/util/oem_intel.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/oem_intel.c
parent55adddbc16f65732b57ab8585c47001fced91d77 (diff)
Imported Upstream version 3.0.0upstream/3.0.0
Diffstat (limited to 'util/oem_intel.c')
-rw-r--r--util/oem_intel.c128
1 files changed, 91 insertions, 37 deletions
diff --git a/util/oem_intel.c b/util/oem_intel.c
index 638f08f..6f61010 100644
--- a/util/oem_intel.c
+++ b/util/oem_intel.c
@@ -370,41 +370,49 @@ int detect_capab_intel(int vend_id,int prod_id, int *cap, int *ndisk,char fdbg)
else fHasEnc = 6;
}
break;
- case 0x003E: /*S5520UR*/
- busid = PRIVATE_BUS_ID;
- fbmctam = 1; /* CG2100 has bmc tam */
- fHasAlarms = 1;
- fHasEnc = 8; /* CG2100 has 8 disks */
- fRelayBits = 1;
- set_max_kcs_loops(URNLOOPS); /*longer for cmds (default 300)*/
- break;
- case 0x005D: /* Copper Pass, CG2200*/
- busid = PRIVATE_BUS_ID;
- fbmctam = 1; /* CG2200 has bmc tam */
- fHasAlarms = 1;
- fRelayBits = 1;
- fHasEnc = 6; /* 6 disks */
+ case 0x003E: /*S5520UR*/
+ busid = PRIVATE_BUS_ID;
+ fbmctam = 1; /* CG2100 has bmc tam */
+ fHasAlarms = 1;
+ fHasEnc = 8; /* CG2100 has 8 disks */
+ fRelayBits = 1;
+ set_max_kcs_loops(URNLOOPS); /*longer for cmds (default 300)*/
+ break;
+ case 0x005D: /* Copper Pass, CG2200*/
+ busid = PRIVATE_BUS_ID;
+ fbmctam = 1; /* CG2200 has bmc tam */
+ fHasAlarms = 1;
+ fRelayBits = 1;
+ fHasEnc = 6; /* 6 disks */
+ set_max_kcs_loops(URNLOOPS); /*longer for cmds (default 300)*/
+ break;
+ case 0x0071: /* CG2300*/
+ busid = PRIVATE_BUS_ID;
+ fbmctam = 1; /* CG2300 has bmc tam */
+ fHasAlarms = 1;
+ fRelayBits = 1;
+ fHasEnc = 6; /* 6 disks */
set_max_kcs_loops(URNLOOPS); /*longer for cmds (default 300)*/
- break;
- case 0x0051: /* Eagle Pass */
- busid = PRIVATE_BUS_ID;
- fbmctam = 1; /* CG1200 has bmc tam */
- fHasAlarms = 1;
- fRelayBits = 1;
- fHasEnc = 4; /* 4 disks */
+ break;
+ case 0x0051: /* Eagle Pass */
+ busid = PRIVATE_BUS_ID;
+ fbmctam = 1; /* CG1200 has bmc tam */
+ fHasAlarms = 1;
+ fRelayBits = 1;
+ fHasEnc = 4; /* 4 disks */
+ set_max_kcs_loops(URNLOOPS); /*longer for cmds (default 300)*/
+ break;
+ case 0x0048: /* "(S1200BT)" *BearTooth Pass*/
+ case 0x004A: /* "(S2600CP)" *Canoe Pass*/
+ case 0x0055: /* Iron Pass */
+ case 0x005C: /* Lizard Head Pass */
+ fHasEnc = 8;
set_max_kcs_loops(URNLOOPS); /*longer for cmds (default 300)*/
- break;
- case 0x0048: /* "(S1200BT)" *BearTooth Pass*/
- case 0x004A: /* "(S2600CP)" *Canoe Pass*/
- case 0x0055: /* Iron Pass */
- case 0x005C: /* Lizard Head Pass */
- fHasEnc = 8;
- set_max_kcs_loops(URNLOOPS); /*longer for cmds (default 300)*/
- break;
- default:
- busid = PRIVATE_BUS_ID;
- fHasEnc = 8;
- break;
+ break;
+ default:
+ busid = PRIVATE_BUS_ID;
+ fHasEnc = 8;
+ break;
}
}
if (fHasAlarms) f |= HAS_ALARMS_MASK;
@@ -415,12 +423,21 @@ int detect_capab_intel(int vend_id,int prod_id, int *cap, int *ndisk,char fdbg)
}
if (fpicmg) f |= HAS_PICMG_MASK;
if (fChesnee) f |= HAS_NSC_MASK;
- if (is_romley(vend_id,prod_id)) {
- if (prod_id == 0x005D) fHasEnc = 6; /*CG2200*/
- fHasEnc = 8;
+ if (is_romley(vend_id,prod_id))
+ {
+ if (prod_id == 0x005D) fHasEnc = 6; /*CG2200*/
+ fHasEnc = 8;
set_max_kcs_loops(URNLOOPS); /*longer for cmds (default 300)*/
- f |= HAS_ROMLEY_MASK;
+ f |= HAS_ROMLEY_MASK;
}
+ if (is_grantley(vend_id,prod_id))
+ {
+ if (prod_id == 0x0071) fHasEnc = 6; /*CG2300*/
+ fHasEnc = 8;
+ set_max_kcs_loops(URNLOOPS); /*longer for cmds (default 300)*/
+ f |= HAS_ROMLEY_MASK;
+ }
+
*cap = f;
return(busid);
}
@@ -927,6 +944,13 @@ struct { ushort id; char *desc; } romleys[RIDS] = {
{ 0x005E, "Big Ridge"} /* Big Ridge */
};
+#define GIDS 3 /* Intel Grantley product ids: */
+struct { ushort id; char *desc; } grantleys[GIDS] = {
+ { 0x006F, "AXXRMM4" }, /* S2600, AXXRMM4LITE */
+ { 0x0070, "S2600" }, /* S2600CO, KP, TP, */
+ { 0x0071, "S2600CW" } /* CG2300, Kontron CG2300 */
+};
+
#define TIDS 5
ushort thurley_ids[TIDS] = { /* Intel Thurley product ids: */
0x003A, /* Snow Hill */
@@ -961,6 +985,36 @@ int intel_romley_desc(int vend, int prod, char **pdesc)
return(ret);
}
+int is_grantley(int vend, int prod)
+{
+ int ret = 0;
+ int i;
+ if (vend != VENDOR_INTEL) return(ret);
+ for (i = 0; i < GIDS; i++)
+ if ((ushort)prod == grantleys[i].id) { ret = 1; break; }
+ /* For now, assume all Intel prods > 0071 act same as Grantley */
+ if (((ushort)prod > grantleys[GIDS-1].id) && ((ushort)prod < 0x00FF))
+ ret = 1;
+ return(ret);
+}
+
+int intel_grantley_desc(int vend, int prod, char **pdesc)
+{
+ int ret = -1;
+ int i;
+ if (vend != VENDOR_INTEL) return(ret);
+ if (pdesc == NULL) return(ret);
+ for (i = 0; i < GIDS; i++) {
+ if ((ushort)prod == grantleys[i].id) {
+ *pdesc = grantleys[i].desc;
+ ret = 0;
+ break;
+ }
+ }
+ if (ret == 0 && (**pdesc == '\0')) *pdesc = "S2600";
+ return(ret);
+}
+
int is_thurley(int vend, int prod)
{
int ret = 0;