Date: Fri, 7 Jun 2013 01:21:09 +0000 (UTC) From: Pyun YongHyeon <yongari@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r251482 - head/sys/dev/bge Message-ID: <201306070121.r571L9bM083782@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: yongari Date: Fri Jun 7 01:21:09 2013 New Revision: 251482 URL: http://svnweb.freebsd.org/changeset/base/251482 Log: 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. Submitted by: Masanobu SAITOH <msaitoh@NetBSD.org> Modified: head/sys/dev/bge/if_bge.c head/sys/dev/bge/if_bgereg.h Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Fri Jun 7 01:01:39 2013 (r251481) +++ head/sys/dev/bge/if_bge.c Fri Jun 7 01:21:09 2013 (r251482) @@ -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: head/sys/dev/bge/if_bgereg.h ============================================================================== --- head/sys/dev/bge/if_bgereg.h Fri Jun 7 01:01:39 2013 (r251481) +++ head/sys/dev/bge/if_bgereg.h Fri Jun 7 01:21:09 2013 (r251482) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306070121.r571L9bM083782>