From owner-svn-src-stable-7@FreeBSD.ORG Sun Nov 28 15:57:27 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 491E8106576D; Sun, 28 Nov 2010 15:57:26 +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 8C8D38FC0A; Sun, 28 Nov 2010 15:57:26 +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 oASFvQoq024768; Sun, 28 Nov 2010 15:57:26 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oASFvQFZ024767; Sun, 28 Nov 2010 15:57:26 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201011281557.oASFvQFZ024767@svn.freebsd.org> From: Marius Strobl Date: Sun, 28 Nov 2010 15:57:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216001 - stable/7/sys/dev/mii X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Nov 2010 15:57:27 -0000 Author: marius Date: Sun Nov 28 15:57:26 2010 New Revision: 216001 URL: http://svn.freebsd.org/changeset/base/216001 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/7/sys/dev/mii/inphy.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mii/inphy.c ============================================================================== --- stable/7/sys/dev/mii/inphy.c Sun Nov 28 15:57:22 2010 (r216000) +++ stable/7/sys/dev/mii/inphy.c Sun Nov 28 15:57:26 2010 (r216001) @@ -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); +}