From owner-svn-src-head@FreeBSD.ORG Wed Mar 10 23:00:15 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A18F0106566B; Wed, 10 Mar 2010 23:00:15 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 766578FC13; Wed, 10 Mar 2010 23:00:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2AN0Fi4087916; Wed, 10 Mar 2010 23:00:15 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2AN0F1T087914; Wed, 10 Mar 2010 23:00:15 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <201003102300.o2AN0F1T087914@svn.freebsd.org> From: Maxim Sobolev Date: Wed, 10 Mar 2010 23:00:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204989 - head/sys/dev/mii X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Mar 2010 23:00:15 -0000 Author: sobomax Date: Wed Mar 10 23:00:15 2010 New Revision: 204989 URL: http://svn.freebsd.org/changeset/base/204989 Log: 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 Modified: head/sys/dev/mii/brgphy.c Modified: head/sys/dev/mii/brgphy.c ============================================================================== --- head/sys/dev/mii/brgphy.c Wed Mar 10 22:33:59 2010 (r204988) +++ head/sys/dev/mii/brgphy.c Wed Mar 10 23:00:15 2010 (r204989) @@ -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