svn commit: r286829 - in head: share/man/man4 sys/dev/e1000
Sean Bruno
sbruno at FreeBSD.org
Sun Aug 16 19:06:25 UTC 2015
Author: sbruno
Date: Sun Aug 16 19:06:23 2015
New Revision: 286829
URL: https://svnweb.freebsd.org/changeset/base/286829
Log:
Add capability to disable CRC stripping. This breaks IPMI/BMC capabilities on certain adatpers.
Linux has been doing the exact same thing since 2008
https://github.com/torvalds/linux/commit/eb7c3adb1ca92450870dbb0d347fc986cd5e2af4
PR: 161277
Differential Revision: https://reviews.freebsd.org/D3282
Submitted by: Fravadona at gmail.com
Reviewed by: erj wblock
MFC after: 2 weeks
Relnotes: yes
Sponsored by: Limelight Networks
Modified:
head/share/man/man4/em.4
head/sys/dev/e1000/if_em.c
Modified: head/share/man/man4/em.4
==============================================================================
--- head/share/man/man4/em.4 Sun Aug 16 17:07:53 2015 (r286828)
+++ head/share/man/man4/em.4 Sun Aug 16 19:06:23 2015 (r286829)
@@ -31,7 +31,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd October 11, 2011
+.Dd August 16, 2015
.Dt EM 4
.Os
.Sh NAME
@@ -205,6 +205,11 @@ Tunables can be set at the
prompt before booting the kernel or stored in
.Xr loader.conf 5 .
.Bl -tag -width indent
+.It Va hw.em.disable_crc_stripping
+Disable or enable hardware stripping of CRC field.
+This is mostly useful on BMC/IPMI shared interfaces where stripping the CRC
+causes remote access over IPMI to fail.
+Default 0 (enabled).
.It Va hw.em.eee_setting
Disable or enable Energy Efficient Ethernet.
Default 1 (disabled).
Modified: head/sys/dev/e1000/if_em.c
==============================================================================
--- head/sys/dev/e1000/if_em.c Sun Aug 16 17:07:53 2015 (r286828)
+++ head/sys/dev/e1000/if_em.c Sun Aug 16 19:06:23 2015 (r286829)
@@ -366,6 +366,10 @@ MODULE_DEPEND(em, netmap, 1, 1, 1);
static SYSCTL_NODE(_hw, OID_AUTO, em, CTLFLAG_RD, 0, "EM driver parameters");
+static int em_disable_crc_stripping = 0;
+SYSCTL_INT(_hw_em, OID_AUTO, disable_crc_stripping, CTLFLAG_RDTUN,
+ &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);
SYSCTL_INT(_hw_em, OID_AUTO, tx_int_delay, CTLFLAG_RDTUN, &em_tx_int_delay_dflt,
@@ -4514,7 +4518,8 @@ em_initialize_receive_unit(struct adapte
(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;
More information about the svn-src-head
mailing list