mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-21 11:13:30 +00:00
Add another variant of BCM5708S controller to IBM HS21 workaround
list. PR: 118238 MFC after: 2 weeks
This commit is contained in:
parent
08a75d1f0e
commit
0d3c2a9a16
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=281877
@ -160,25 +160,33 @@ static const struct mii_phy_funcs brgphy_funcs = {
|
|||||||
brgphy_reset
|
brgphy_reset
|
||||||
};
|
};
|
||||||
|
|
||||||
#define HS21_PRODUCT_ID "IBM eServer BladeCenter HS21"
|
static const struct hs21_type {
|
||||||
#define HS21_BCM_CHIPID 0x57081021
|
const uint32_t id;
|
||||||
|
const char *prod;
|
||||||
|
} hs21_type_lists[] = {
|
||||||
|
{ 0x57081021, "IBM eServer BladeCenter HS21" },
|
||||||
|
{ 0x57081011, "IBM eServer BladeCenter HS21 -[8853PAU]-" },
|
||||||
|
};
|
||||||
|
|
||||||
static int
|
static int
|
||||||
detect_hs21(struct bce_softc *bce_sc)
|
detect_hs21(struct bce_softc *bce_sc)
|
||||||
{
|
{
|
||||||
char *sysenv;
|
char *sysenv;
|
||||||
int found;
|
int found, i;
|
||||||
|
|
||||||
found = 0;
|
found = 0;
|
||||||
if (bce_sc->bce_chipid == HS21_BCM_CHIPID) {
|
sysenv = kern_getenv("smbios.system.product");
|
||||||
sysenv = kern_getenv("smbios.system.product");
|
if (sysenv == NULL)
|
||||||
if (sysenv != NULL) {
|
return (found);
|
||||||
if (strncmp(sysenv, HS21_PRODUCT_ID,
|
for (i = 0; i < nitems(hs21_type_lists); i++) {
|
||||||
strlen(HS21_PRODUCT_ID)) == 0)
|
if (bce_sc->bce_chipid == hs21_type_lists[i].id &&
|
||||||
found = 1;
|
strncmp(sysenv, hs21_type_lists[i].prod,
|
||||||
freeenv(sysenv);
|
strlen(hs21_type_lists[i].prod)) == 0) {
|
||||||
|
found++;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
freeenv(sysenv);
|
||||||
return (found);
|
return (found);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user