diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2012-01-13 09:38:24 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2012-01-13 09:38:24 +0000 |
commit | ffe459cb7def60bf29c44f2c53b5c82ca24713e2 (patch) | |
tree | 9bd2bbcbd6fff175d1b7dbd3cd237eadf652b69e /sys | |
parent | 662b43e6821aa5209831b75e50410d6d8083a178 (diff) |
Repair hw vlan tagging and stripping on 82599. Previously receiver
would prepend another vlan tag 0 to all frames containing 802.1Q
tags rendering vlans unusable.
ok jsg, deraadt
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/if_ix.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/sys/dev/pci/if_ix.c b/sys/dev/pci/if_ix.c index e09e66870ce..9212497f3ce 100644 --- a/sys/dev/pci/if_ix.c +++ b/sys/dev/pci/if_ix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ix.c,v 1.58 2011/12/12 20:45:30 mikeb Exp $ */ +/* $OpenBSD: if_ix.c,v 1.59 2012/01/13 09:38:23 mikeb Exp $ */ /****************************************************************************** @@ -3115,8 +3115,7 @@ ixgbe_rxeof(struct ix_queue *que, int count) /* Singlet, prepare to send */ sendmp = mh; #if NVLAN > 0 - if ((sc->num_vlans) && - (staterr & IXGBE_RXD_STAT_VP)) { + if (staterr & IXGBE_RXD_STAT_VP) { sendmp->m_pkthdr.ether_vtag = vtag; sendmp->m_flags |= M_VLANTAG; } @@ -3143,8 +3142,7 @@ ixgbe_rxeof(struct ix_queue *que, int count) sendmp = mp; sendmp->m_pkthdr.len = mp->m_len; #if NVLAN > 0 - if ((sc->num_vlans) && - (staterr & IXGBE_RXD_STAT_VP)) { + if (staterr & IXGBE_RXD_STAT_VP) { sendmp->m_pkthdr.ether_vtag = vtag; sendmp->m_flags |= M_VLANTAG; } @@ -3234,15 +3232,6 @@ ixgbe_setup_vlan_hw_support(struct ix_softc *sc) int i; /* - * We get here thru ixgbe_init, meaning - * a soft reset, this has already cleared - * the VFTA and other state, so if there - * have been no vlan's registered do nothing. - */ - if (sc->num_vlans == 0) - return; - - /* * A soft reset zero's out the VFTA, so * we need to repopulate it now. */ |