svn commit: r364878 - stable/12/sys/dev/e1000
Vincenzo Maffione
vmaffione at FreeBSD.org
Thu Aug 27 19:12:49 UTC 2020
Author: vmaffione
Date: Thu Aug 27 19:12:39 2020
New Revision: 364878
URL: https://svnweb.freebsd.org/changeset/base/364878
Log:
MFC r363995
em(4): honor vlanhwtag offload
The FreeBSD em driver fails to properly reset the VME flag
in the e1000 CTRL register oneg the following ifconfig command
ifconfig em1 -vlanhwtag
Tested on the e1000 device emulated by QEMU, and on a real
NIC (chip=0x10d38086).
PR: 236584
Submitted by: murat at sunnyvalley.io
Reported by: murat at sunnyvalley.io
Differential Revision: https://reviews.freebsd.org/D25286
Modified:
stable/12/sys/dev/e1000/if_em.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/dev/e1000/if_em.c
==============================================================================
--- stable/12/sys/dev/e1000/if_em.c Thu Aug 27 17:46:13 2020 (r364877)
+++ stable/12/sys/dev/e1000/if_em.c Thu Aug 27 19:12:39 2020 (r364878)
@@ -1330,6 +1330,11 @@ em_if_init(if_ctx_t ctx)
ctrl |= E1000_CTRL_VME;
E1000_WRITE_REG(&adapter->hw, E1000_CTRL, ctrl);
}
+ } else {
+ u32 ctrl;
+ ctrl = E1000_READ_REG(&adapter->hw, E1000_CTRL);
+ ctrl &= ~E1000_CTRL_VME;
+ E1000_WRITE_REG(&adapter->hw, E1000_CTRL, ctrl);
}
/* Don't lose promiscuous settings */
More information about the svn-src-all
mailing list