From owner-svn-src-stable-8@FreeBSD.ORG Sun Nov 28 15:57:23 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F0C0106564A; Sun, 28 Nov 2010 15:57:23 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3C8B38FC08; Sun, 28 Nov 2010 15:57:23 +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 oASFvNPW024732; Sun, 28 Nov 2010 15:57:23 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oASFvN87024730; Sun, 28 Nov 2010 15:57:23 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201011281557.oASFvN87024730@svn.freebsd.org> From: Marius Strobl Date: Sun, 28 Nov 2010 15:57:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216000 - stable/8/sys/dev/mii X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Nov 2010 15:57:23 -0000 Author: marius Date: Sun Nov 28 15:57:22 2010 New Revision: 216000 URL: http://svn.freebsd.org/changeset/base/216000 Log: MFC: r215905 Ensure Bay flow control is disabled as we're going to use IEEE 802.3 annex 31B full duplex flow control instead. Modified: stable/8/sys/dev/mii/inphy.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/mii/inphy.c ============================================================================== --- stable/8/sys/dev/mii/inphy.c Sun Nov 28 14:57:37 2010 (r215999) +++ stable/8/sys/dev/mii/inphy.c Sun Nov 28 15:57:22 2010 (r216000) @@ -77,6 +77,7 @@ DRIVER_MODULE(inphy, miibus, inphy_drive static int inphy_service(struct mii_softc *, struct mii_data *, int); static void inphy_status(struct mii_softc *); +static void inphy_reset(struct mii_softc *); static const struct mii_phydesc inphys[] = { MII_PHY_DESC(INTEL, I82553C), @@ -119,7 +120,7 @@ inphy_attach(device_t dev) IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, IFM_LOOP, sc->mii_inst), MII_MEDIA_100_TX, NULL); - mii_phy_reset(sc); + inphy_reset(sc); sc->mii_capabilities = PHY_READ(sc, MII_BMSR) & ma->mii_capmask; device_printf(dev, " "); @@ -206,3 +207,14 @@ inphy_status(struct mii_softc *sc) } else mii->mii_media_active = ife->ifm_media; } + +static void +inphy_reset(struct mii_softc *sc) +{ + + mii_phy_reset(sc); + + /* Ensure Bay flow control is disabled. */ + PHY_WRITE(sc, MII_INPHY_SCR, + PHY_READ(sc, MII_INPHY_SCR) & ~SCR_FLOWCTL); +}