From nobody@FreeBSD.org  Tue Oct  4 11:27:53 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4D0FE106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  4 Oct 2011 11:27:53 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 3CAB58FC19
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  4 Oct 2011 11:27:53 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p94BRrmg052966
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 4 Oct 2011 11:27:53 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p94BRr3Q052965;
	Tue, 4 Oct 2011 11:27:53 GMT
	(envelope-from nobody)
Message-Id: <201110041127.p94BRr3Q052965@red.freebsd.org>
Date: Tue, 4 Oct 2011 11:27:53 GMT
From: Rafael NAVAZA <Fravadona@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch][if_em] BMC cannot receive IPMI traffic after loading or enabling the if_em driver
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         161277
>Category:       kern
>Synopsis:       [em] [patch] BMC cannot receive IPMI traffic after loading or enabling the if_em driver
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-net
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 04 11:30:16 UTC 2011
>Closed-Date:    
>Last-Modified:  Wed Oct 05 04:44:51 UTC 2011
>Originator:     Rafael NAVAZA
>Release:        FreeBSD 8.2
>Organization:
Institut Pasteur
>Environment:
FreeBSD frbox 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Fri Feb 18 02:24:46 UTC 2011     root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
With Intel 82473E NICs, the BMC cannot receive IPMI-over-LAN traffic after loading or enabling the if_em driver.
>How-To-Repeat:
Get a machine with BMC enabled Intel 82573E NIC, and try to "ifconfig" the "em" interfaces.
Then the BMC will stop responding to the IPMI-over-LAN traffic.
>Fix:
Disable the CRC stripping in the if_em driver.

Proposed fix : Add an "em.disable_crc_stripping" option to the if_em driver. 


Patch attached with submission follows:

--- /usr/src/sys/dev/e1000/if_em.c	2011-01-26 00:20:22.000000000 +0100
+++ /usr/src/sys/dev/e1000/if_em.c.disable_crc_stripping	2011-09-15 12:44:23.000000000 +0200
@@ -332,6 +332,12 @@
 #define CSUM_TSO	0
 #endif
 
+static int em_disable_crc_stripping = 0;
+TUNABLE_INT("hw.em.disable_crc_stripping", &em_disable_crc_stripping);
+
+SYSCTL_NODE(_hw, OID_AUTO, em, CTLFLAG_RD, 0, "EM driver parameters");
+SYSCTL_INT(_hw_em, OID_AUTO, disable_crc_stripping, CTLFLAG_RD, &em_disable_crc_stripping, 0, "Disable CRC Stripping");
+
 static int em_tx_int_delay_dflt = EM_TICKS_TO_USECS(EM_TIDV);
 static int em_rx_int_delay_dflt = EM_TICKS_TO_USECS(EM_RDTR);
 TUNABLE_INT("hw.em.tx_int_delay", &em_tx_int_delay_dflt);
@@ -4150,7 +4156,8 @@
 	    (hw->mac.mc_filter_type << E1000_RCTL_MO_SHIFT);
 
         /* Strip the CRC */
-        rctl |= E1000_RCTL_SECRC;
+        if (!em_disable_crc_stripping)
+		rctl |= E1000_RCTL_SECRC;
 
         /* Make sure VLAN Filters are off */
         rctl &= ~E1000_RCTL_VFE;


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Oct 5 04:44:35 UTC 2011 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=161277 
>Unformatted:
