summaryrefslogtreecommitdiffstats
path: root/sys/dev/mii/brgphy.c
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2010-03-10 23:00:15 +0000
committersobomax <sobomax@FreeBSD.org>2010-03-10 23:00:15 +0000
commite530af564e11c4863c2f3a77da5fc82a63349540 (patch)
treed0675095ab5ddfc640e2fba2b1f3647ac08a1543 /sys/dev/mii/brgphy.c
parent8c49bc5976d8a5fe0a2516fbc5283a6ac7ce6ec8 (diff)
downloadFreeBSD-src-e530af564e11c4863c2f3a77da5fc82a63349540.zip
FreeBSD-src-e530af564e11c4863c2f3a77da5fc82a63349540.tar.gz
further narrow down no carrier workaround, since it appears to only affect
very specific IBM hardware and other machines with the same BCM ASIC chip id 0x57081021 are just fine. MFC after: 1 month
Diffstat (limited to 'sys/dev/mii/brgphy.c')
-rw-r--r--sys/dev/mii/brgphy.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/sys/dev/mii/brgphy.c b/sys/dev/mii/brgphy.c
index 7725555..3b28d45 100644
--- a/sys/dev/mii/brgphy.c
+++ b/sys/dev/mii/brgphy.c
@@ -66,8 +66,6 @@ __FBSDID("$FreeBSD$");
static int brgphy_probe(device_t);
static int brgphy_attach(device_t);
-#define BCM5708S_BAD_CHIPID 0x57081021
-
struct brgphy_softc {
struct mii_softc mii_sc;
int mii_oui;
@@ -145,6 +143,23 @@ static const struct mii_phydesc brgphys[] = {
MII_PHY_END
};
+#define HS21_PRODUCT_ID "IBM eServer BladeCenter HS21"
+#define HS21_BCM_CHIPID 0x57081021
+
+static int
+detect_hs21(struct bce_softc *bce_sc)
+{
+ char *sysenv;
+
+ if (bce_sc->bce_chipid != HS21_BCM_CHIPID)
+ return 0;
+ sysenv = getenv("smbios.system.product");
+ if (sysenv == NULL)
+ return 0;
+ if (strncmp(sysenv, HS21_PRODUCT_ID, strlen(HS21_PRODUCT_ID)) != 0)
+ return 0;
+ return (1);
+}
/* Search for our PHY in the list of known PHYs */
static int
@@ -295,10 +310,10 @@ brgphy_attach(device_t dev)
ADD(IFM_MAKEWORD(IFM_ETHER, IFM_2500_SX, IFM_FDX, sc->mii_inst), 0);
printf("2500baseSX-FDX, ");
} else if ((bsc->serdes_flags & BRGPHY_5708S) && bce_sc &&
- (bce_sc->bce_chipid == BCM5708S_BAD_CHIPID)) {
+ (detect_hs21(bce_sc) != 0)) {
/*
* There appears to be certain silicon revision
- * usually used in blades that is having issues with
+ * in IBM HS21 blades that is having issues with
* this driver wating for the auto-negotiation to
* complete. This happens with a specific chip id
* only and when the 1000baseSX-FDX is the only
OpenPOWER on IntegriCloud