Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 May 2011 20:29:50 +0000 (UTC)
From:      Pyun YongHyeon <yongari@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: r222146 - in stable/8/sys/dev: bge mii
Message-ID:  <201105202029.p4KKTomn099482@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yongari
Date: Fri May 20 20:29:50 2011
New Revision: 222146
URL: http://svn.freebsd.org/changeset/base/222146

Log:
  MFC r221468:
    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:
  stable/8/sys/dev/bge/if_bge.c
  stable/8/sys/dev/bge/if_bgereg.h
  stable/8/sys/dev/mii/brgphy.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/bge/if_bge.c
==============================================================================
--- stable/8/sys/dev/bge/if_bge.c	Fri May 20 20:27:25 2011	(r222145)
+++ stable/8/sys/dev/bge/if_bge.c	Fri May 20 20:29:50 2011	(r222146)
@@ -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: stable/8/sys/dev/bge/if_bgereg.h
==============================================================================
--- stable/8/sys/dev/bge/if_bgereg.h	Fri May 20 20:27:25 2011	(r222145)
+++ stable/8/sys/dev/bge/if_bgereg.h	Fri May 20 20:29:50 2011	(r222146)
@@ -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: stable/8/sys/dev/mii/brgphy.c
==============================================================================
--- stable/8/sys/dev/mii/brgphy.c	Fri May 20 20:27:25 2011	(r222145)
+++ stable/8/sys/dev/mii/brgphy.c	Fri May 20 20:29:50 2011	(r222146)
@@ -970,7 +970,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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105202029.p4KKTomn099482>