Date: Sat, 26 Mar 2011 21:32:10 +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-7@freebsd.org Subject: svn commit: r220045 - stable/7/sys/dev/vte Message-ID: <201103262132.p2QLWAEJ037081@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: yongari Date: Sat Mar 26 21:32:10 2011 New Revision: 220045 URL: http://svn.freebsd.org/changeset/base/220045 Log: MFC r219787: Correct broadcast frame handling. Setting bit6 of MCR0 register enables broadcast filtering. Make sure to clear the bit to receive broadcast frames. While I'm here rename the bit definition to reflect reality. Reported by: brad@OpenBSD Modified: stable/7/sys/dev/vte/if_vte.c stable/7/sys/dev/vte/if_vtereg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/vte/if_vte.c ============================================================================== --- stable/7/sys/dev/vte/if_vte.c Sat Mar 26 21:29:39 2011 (r220044) +++ stable/7/sys/dev/vte/if_vte.c Sat Mar 26 21:32:10 2011 (r220045) @@ -1963,9 +1963,10 @@ vte_rxfilter(struct vte_softc *sc) } mcr = CSR_READ_2(sc, VTE_MCR0); - mcr &= ~(MCR0_PROMISC | MCR0_BROADCAST | MCR0_MULTICAST); + mcr &= ~(MCR0_PROMISC | MCR0_MULTICAST); + mcr |= MCR0_BROADCAST_DIS; if ((ifp->if_flags & IFF_BROADCAST) != 0) - mcr |= MCR0_BROADCAST; + mcr &= ~MCR0_BROADCAST_DIS; if ((ifp->if_flags & (IFF_PROMISC | IFF_ALLMULTI)) != 0) { if ((ifp->if_flags & IFF_PROMISC) != 0) mcr |= MCR0_PROMISC; Modified: stable/7/sys/dev/vte/if_vtereg.h ============================================================================== --- stable/7/sys/dev/vte/if_vtereg.h Sat Mar 26 21:29:39 2011 (r220044) +++ stable/7/sys/dev/vte/if_vtereg.h Sat Mar 26 21:32:10 2011 (r220045) @@ -48,7 +48,7 @@ #define MCR0_ACCPT_LONG_PKT 0x0008 #define MCR0_ACCPT_DRIBBLE 0x0010 #define MCR0_PROMISC 0x0020 -#define MCR0_BROADCAST 0x0040 +#define MCR0_BROADCAST_DIS 0x0040 #define MCR0_RX_EARLY_INTR 0x0080 #define MCR0_MULTICAST 0x0100 #define MCR0_FC_ENB 0x0200
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103262132.p2QLWAEJ037081>