svn commit: r252455 - stable/9/sys/dev/bge

Pyun YongHyeon yongari at FreeBSD.org
Mon Jul 1 07:02:45 UTC 2013


Author: yongari
Date: Mon Jul  1 07:02:44 2013
New Revision: 252455
URL: http://svnweb.freebsd.org/changeset/base/252455

Log:
  MFC r251482,251733:
  r251482:
    Correct setting TX random backoff register. This register is
    implemented as a 10 bits linear feedback shift register so only
    lower 10 bits are valid.
    Because this register is used to initialize random backoff interval
    register only when resolved duplex is half-duplex, it wouldn't have
    caused issues in these days.
  
  r251733:
    Fix a typo introduced in r213280. IFM_OPTIONS macro should see
    current media word.

Modified:
  stable/9/sys/dev/bge/if_bge.c
  stable/9/sys/dev/bge/if_bgereg.h
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/bge/if_bge.c
==============================================================================
--- stable/9/sys/dev/bge/if_bge.c	Mon Jul  1 07:00:12 2013	(r252454)
+++ stable/9/sys/dev/bge/if_bge.c	Mon Jul  1 07:02:44 2013	(r252455)
@@ -1284,7 +1284,7 @@ bge_miibus_statchg(device_t dev)
 	/* Set MAC flow control behavior to match link flow control settings. */
 	tx_mode &= ~BGE_TXMODE_FLOWCTL_ENABLE;
 	rx_mode &= ~BGE_RXMODE_FLOWCTL_ENABLE;
-	if (IFM_OPTIONS(mii->mii_media_active & IFM_FDX) != 0) {
+	if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FDX) != 0) {
 		if ((IFM_OPTIONS(mii->mii_media_active) & IFM_ETH_TXPAUSE) != 0)
 			tx_mode |= BGE_TXMODE_FLOWCTL_ENABLE;
 		if ((IFM_OPTIONS(mii->mii_media_active) & IFM_ETH_RXPAUSE) != 0)
@@ -2280,9 +2280,9 @@ bge_blockinit(struct bge_softc *sc)
 
 	/* Set random backoff seed for TX */
 	CSR_WRITE_4(sc, BGE_TX_RANDOM_BACKOFF,
-	    IF_LLADDR(sc->bge_ifp)[0] + IF_LLADDR(sc->bge_ifp)[1] +
+	    (IF_LLADDR(sc->bge_ifp)[0] + IF_LLADDR(sc->bge_ifp)[1] +
 	    IF_LLADDR(sc->bge_ifp)[2] + IF_LLADDR(sc->bge_ifp)[3] +
-	    IF_LLADDR(sc->bge_ifp)[4] + IF_LLADDR(sc->bge_ifp)[5] +
+	    IF_LLADDR(sc->bge_ifp)[4] + IF_LLADDR(sc->bge_ifp)[5]) &
 	    BGE_TX_BACKOFF_SEED_MASK);
 
 	/* Set inter-packet gap */

Modified: stable/9/sys/dev/bge/if_bgereg.h
==============================================================================
--- stable/9/sys/dev/bge/if_bgereg.h	Mon Jul  1 07:00:12 2013	(r252454)
+++ stable/9/sys/dev/bge/if_bgereg.h	Mon Jul  1 07:02:44 2013	(r252455)
@@ -797,7 +797,7 @@
 #define	BGE_LEDCTL_BLINKPERIOD_OVERRIDE	0x80000000
 
 /* TX backoff seed register */
-#define	BGE_TX_BACKOFF_SEED_MASK	0x3F
+#define	BGE_TX_BACKOFF_SEED_MASK	0x3FF
 
 /* Autopoll status register */
 #define	BGE_AUTOPOLLSTS_ERROR		0x00000001


More information about the svn-src-stable-9 mailing list