Date: Fri, 21 Jan 2011 00:50:34 +0000 (UTC) From: Marius Strobl <marius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r217674 - stable/8/sys/dev/mii Message-ID: <201101210050.p0L0oYGO033711@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marius Date: Fri Jan 21 00:50:34 2011 New Revision: 217674 URL: http://svn.freebsd.org/changeset/base/217674 Log: MFC: r217414 - Don't announce PAUSE support for half-duplex when MIIF_FORCEPAUSE is set. - Let mii_phy_auto() also announce PAUSE support for 10baseT-FDX. Modified: stable/8/sys/dev/mii/jmphy.c stable/8/sys/dev/mii/mii_physubr.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/jmphy.c ============================================================================== --- stable/8/sys/dev/mii/jmphy.c Fri Jan 21 00:48:08 2011 (r217673) +++ stable/8/sys/dev/mii/jmphy.c Fri Jan 21 00:50:34 2011 (r217674) @@ -334,10 +334,10 @@ jmphy_setmedia(struct mii_softc *sc, str bmcr |= BMCR_LOOP; anar = jmphy_anar(ife); - if (((IFM_SUBTYPE(ife->ifm_media) == IFM_AUTO || + if ((IFM_SUBTYPE(ife->ifm_media) == IFM_AUTO || (ife->ifm_media & IFM_FDX) != 0) && - (ife->ifm_media & IFM_FLOW) != 0) || - (sc->mii_flags & MIIF_FORCEPAUSE) != 0) + ((ife->ifm_media & IFM_FLOW) != 0 || + (sc->mii_flags & MIIF_FORCEPAUSE) != 0)) anar |= ANAR_PAUSE_TOWARDS; if ((sc->mii_flags & MIIF_HAVE_GTCR) != 0) { Modified: stable/8/sys/dev/mii/mii_physubr.c ============================================================================== --- stable/8/sys/dev/mii/mii_physubr.c Fri Jan 21 00:48:08 2011 (r217673) +++ stable/8/sys/dev/mii/mii_physubr.c Fri Jan 21 00:50:34 2011 (r217674) @@ -135,8 +135,9 @@ mii_phy_setmedia(struct mii_softc *sc) gtcr |= GTCR_ADV_MS; } - if ((ife->ifm_media & IFM_GMASK) == (IFM_FDX | IFM_FLOW) || - (sc->mii_flags & MIIF_FORCEPAUSE) != 0) { + if ((ife->ifm_media & IFM_FDX) != 0 && + ((ife->ifm_media & IFM_FLOW) != 0 || + (sc->mii_flags & MIIF_FORCEPAUSE) != 0)) { if ((sc->mii_flags & MIIF_IS_1000X) != 0) anar |= ANAR_X_PAUSE_TOWARDS; else { @@ -184,7 +185,8 @@ mii_phy_auto(struct mii_softc *sc) ANAR_CSMA; if ((ife->ifm_media & IFM_FLOW) != 0 || (sc->mii_flags & MIIF_FORCEPAUSE) != 0) { - if ((sc->mii_capabilities & BMSR_100TXFDX) != 0) + if ((sc->mii_capabilities & + (BMSR_10TFDX | BMSR_100TXFDX)) != 0) anar |= ANAR_FC; /* XXX Only 1000BASE-T has PAUSE_ASYM? */ if (((sc->mii_flags & MIIF_HAVE_GTCR) != 0) &&
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101210050.p0L0oYGO033711>