From owner-svn-src-stable@FreeBSD.ORG Sun Mar 22 22:08:31 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59FF910656C6; Sun, 22 Mar 2009 22:08:31 +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 2C3478FC1E; Sun, 22 Mar 2009 22:08:31 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n2MM8UZt085421; Sun, 22 Mar 2009 22:08:30 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n2MM8Uu4085419; Sun, 22 Mar 2009 22:08:30 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <200903222208.n2MM8Uu4085419@svn.freebsd.org> From: Marius Strobl Date: Sun, 22 Mar 2009 22:08:30 +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: r190294 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb dev/dc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2009 22:08:33 -0000 Author: marius Date: Sun Mar 22 22:08:30 2009 New Revision: 190294 URL: http://svn.freebsd.org/changeset/base/190294 Log: MFC: r190117 - Set MIIF_NOLOOP and don't add IFM_LOOP as loopback apparently isn't supported with these pseudo-PHYs. The MIIF_NOLOOP flag currently triggers nothing but hopefully will be respected by mii_phy_setmedia() later on. - Don't add IFM_NONE as isolation isn't supported by these pseudo-PHYs. - Use mii_phy_add_media() instead of mii_add_media() so the latter can be eventually retired. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/dev/dc/dcphy.c stable/7/sys/dev/dc/pnphy.c Modified: stable/7/sys/dev/dc/dcphy.c ============================================================================== --- stable/7/sys/dev/dc/dcphy.c Sun Mar 22 22:07:52 2009 (r190293) +++ stable/7/sys/dev/dc/dcphy.c Sun Mar 22 22:08:30 2009 (r190294) @@ -154,13 +154,12 @@ dcphy_attach(device_t dev) sc->mii_service = dcphy_service; sc->mii_pdata = mii; - sc->mii_flags |= MIIF_NOISOLATE; - mii->mii_instance++; - -#define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL) + /* + * Apparently, we can neither isolate nor do loopback. + */ + sc->mii_flags |= MIIF_NOISOLATE | MIIF_NOLOOP; - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_NONE, 0, sc->mii_inst), - BMCR_ISO); + mii->mii_instance++; /*dcphy_reset(sc);*/ dc_sc = mii->mii_ifp->if_softc; @@ -186,9 +185,8 @@ dcphy_attach(device_t dev) sc->mii_capabilities &= ma->mii_capmask; device_printf(dev, " "); - mii_add_media(sc); + mii_phy_add_media(sc); printf("\n"); -#undef ADD MIIBUS_MEDIAINIT(sc->mii_dev); return (0); Modified: stable/7/sys/dev/dc/pnphy.c ============================================================================== --- stable/7/sys/dev/dc/pnphy.c Sun Mar 22 22:07:52 2009 (r190293) +++ stable/7/sys/dev/dc/pnphy.c Sun Mar 22 22:08:30 2009 (r190294) @@ -137,24 +137,19 @@ pnphy_attach(device_t dev) sc->mii_service = pnphy_service; sc->mii_pdata = mii; - sc->mii_flags |= MIIF_NOISOLATE; - mii->mii_instance++; + /* + * Apparently, we can neither isolate nor do loopback. + */ + sc->mii_flags |= MIIF_NOISOLATE | MIIF_NOLOOP; -#define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL) + mii->mii_instance++; sc->mii_capabilities = BMSR_100TXFDX | BMSR_100TXHDX | BMSR_10TFDX | BMSR_10THDX; sc->mii_capabilities &= ma->mii_capmask; device_printf(dev, " "); - mii_add_media(sc); + mii_phy_add_media(sc); printf("\n"); - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_NONE, 0, sc->mii_inst), - BMCR_ISO); - - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, IFM_LOOP, sc->mii_inst), - BMCR_LOOP|BMCR_S100); - -#undef ADD MIIBUS_MEDIAINIT(sc->mii_dev); return (0);