Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Aug 2013 01:15:32 +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: r254118 - head/sys/dev/bge
Message-ID:  <201308090115.r791FWhD050579@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yongari
Date: Fri Aug  9 01:15:32 2013
New Revision: 254118
URL: http://svnweb.freebsd.org/changeset/base/254118

Log:
  Fix for IPv4 fragment packets treated as RMCP.
  
  bit25 of rxMode MAC register of 5762 needs to be set for rx mgmt
  filter to work correctly when processing match for UDP header
  fields.  Otherwise false positive can occur which causes IPv4
  fragment to be received by APE instead of host.
  
  Reported by:	Geans Pin <geanspin@broadcom.com>

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 Aug  9 01:10:33 2013	(r254117)
+++ head/sys/dev/bge/if_bge.c	Fri Aug  9 01:15:32 2013	(r254118)
@@ -5542,6 +5542,8 @@ bge_init_locked(struct bge_softc *sc)
 	mode = CSR_READ_4(sc, BGE_RX_MODE);
 	if (BGE_IS_5755_PLUS(sc))
 		mode |= BGE_RXMODE_IPV6_ENABLE;
+	if (sc->bge_asicrev == BGE_ASICREV_BCM5762)
+		mode |= BGE_RXMODE_IPV4_FRAG_FIX;
 	CSR_WRITE_4(sc,BGE_RX_MODE, mode | BGE_RXMODE_ENABLE);
 	DELAY(10);
 

Modified: head/sys/dev/bge/if_bgereg.h
==============================================================================
--- head/sys/dev/bge/if_bgereg.h	Fri Aug  9 01:10:33 2013	(r254117)
+++ head/sys/dev/bge/if_bgereg.h	Fri Aug  9 01:15:32 2013	(r254118)
@@ -841,6 +841,7 @@
 #define	BGE_RXMODE_RX_NO_CRC_CHECK	0x00000200
 #define	BGE_RXMODE_RX_KEEP_VLAN_DIAG	0x00000400
 #define	BGE_RXMODE_IPV6_ENABLE		0x01000000
+#define	BGE_RXMODE_IPV4_FRAG_FIX	0x02000000
 
 /* Receive MAC status register */
 #define	BGE_RXSTAT_REMOTE_XOFFED	0x00000001



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