From owner-svn-src-all@FreeBSD.ORG Thu May 5 00:43:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1CAF106566C; Thu, 5 May 2011 00:43:40 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A45FD8FC17; Thu, 5 May 2011 00:43:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p450heIE074076; Thu, 5 May 2011 00:43:40 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p450heh0074072; Thu, 5 May 2011 00:43:40 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105050043.p450heh0074072@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 5 May 2011 00:43:40 +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: r221468 - in head/sys/dev: bge mii X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 00:43:40 -0000 Author: yongari Date: Thu May 5 00:43:40 2011 New Revision: 221468 URL: http://svn.freebsd.org/changeset/base/221468 Log: Enable Ethernet@WireSpeed for BCM5718/BCM57765 family. While I'm here inverse meaning of PHY flag as Ethernet@WireSpeed is enabled for most PHYs. Modified: head/sys/dev/bge/if_bge.c head/sys/dev/bge/if_bgereg.h head/sys/dev/mii/brgphy.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Thu May 5 00:11:09 2011 (r221467) +++ head/sys/dev/bge/if_bge.c Thu May 5 00:43:40 2011 (r221468) @@ -2769,12 +2769,12 @@ bge_attach(device_t dev) * Don't enable Ethernet@WireSpeed for the 5700, 5906, or the * 5705 A0 and A1 chips. */ - if (sc->bge_asicrev != BGE_ASICREV_BCM5700 && - sc->bge_asicrev != BGE_ASICREV_BCM5906 && - sc->bge_chipid != BGE_CHIPID_BCM5705_A0 && - sc->bge_chipid != BGE_CHIPID_BCM5705_A1 && - !BGE_IS_5717_PLUS(sc)) - sc->bge_phy_flags |= BGE_PHY_WIRESPEED; + if (sc->bge_asicrev == BGE_ASICREV_BCM5700 || + (sc->bge_asicrev == BGE_ASICREV_BCM5705 && + (sc->bge_chipid != BGE_CHIPID_BCM5705_A0 && + sc->bge_chipid != BGE_CHIPID_BCM5705_A1)) || + sc->bge_asicrev == BGE_ASICREV_BCM5906) + sc->bge_phy_flags |= BGE_PHY_NO_WIRESPEED; if (bge_has_eaddr(sc)) sc->bge_flags |= BGE_FLAG_EADDR; Modified: head/sys/dev/bge/if_bgereg.h ============================================================================== --- head/sys/dev/bge/if_bgereg.h Thu May 5 00:11:09 2011 (r221467) +++ head/sys/dev/bge/if_bgereg.h Thu May 5 00:43:40 2011 (r221468) @@ -2783,7 +2783,7 @@ struct bge_softc { #define BGE_FLAG_RX_ALIGNBUG 0x04000000 #define BGE_FLAG_SHORT_DMA_BUG 0x08000000 uint32_t bge_phy_flags; -#define BGE_PHY_WIRESPEED 0x00000001 +#define BGE_PHY_NO_WIRESPEED 0x00000001 #define BGE_PHY_ADC_BUG 0x00000002 #define BGE_PHY_5704_A0_BUG 0x00000004 #define BGE_PHY_JITTER_BUG 0x00000008 Modified: head/sys/dev/mii/brgphy.c ============================================================================== --- head/sys/dev/mii/brgphy.c Thu May 5 00:11:09 2011 (r221467) +++ head/sys/dev/mii/brgphy.c Thu May 5 00:43:40 2011 (r221468) @@ -927,7 +927,7 @@ brgphy_reset(struct mii_softc *sc) brgphy_jumbo_settings(sc, ifp->if_mtu); - if (bge_sc->bge_phy_flags & BGE_PHY_WIRESPEED) + if ((bge_sc->bge_phy_flags & BGE_PHY_NO_WIRESPEED) == 0) brgphy_ethernet_wirespeed(sc); /* Enable Link LED on Dell boxes */