From owner-svn-src-stable@FreeBSD.ORG Sat Mar 26 21:32:10 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4DFF1065672; Sat, 26 Mar 2011 21:32:10 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 951618FC08; Sat, 26 Mar 2011 21:32:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2QLWADE037084; Sat, 26 Mar 2011 21:32:10 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2QLWAEJ037081; Sat, 26 Mar 2011 21:32:10 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201103262132.p2QLWAEJ037081@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 26 Mar 2011 21:32:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220045 - stable/7/sys/dev/vte X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 21:32:10 -0000 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