|
@@ -4100,6 +4100,8 @@ static void ixgbe_vlan_promisc_enable(struct ixgbe_adapter *adapter)
|
|
struct ixgbe_hw *hw = &adapter->hw;
|
|
struct ixgbe_hw *hw = &adapter->hw;
|
|
u32 vlnctrl, i;
|
|
u32 vlnctrl, i;
|
|
|
|
|
|
|
|
+ vlnctrl = IXGBE_READ_REG(hw, IXGBE_VLNCTRL);
|
|
|
|
+
|
|
switch (hw->mac.type) {
|
|
switch (hw->mac.type) {
|
|
case ixgbe_mac_82599EB:
|
|
case ixgbe_mac_82599EB:
|
|
case ixgbe_mac_X540:
|
|
case ixgbe_mac_X540:
|
|
@@ -4112,8 +4114,7 @@ static void ixgbe_vlan_promisc_enable(struct ixgbe_adapter *adapter)
|
|
/* fall through */
|
|
/* fall through */
|
|
case ixgbe_mac_82598EB:
|
|
case ixgbe_mac_82598EB:
|
|
/* legacy case, we can just disable VLAN filtering */
|
|
/* legacy case, we can just disable VLAN filtering */
|
|
- vlnctrl = IXGBE_READ_REG(hw, IXGBE_VLNCTRL);
|
|
|
|
- vlnctrl &= ~(IXGBE_VLNCTRL_VFE | IXGBE_VLNCTRL_CFIEN);
|
|
|
|
|
|
+ vlnctrl &= ~IXGBE_VLNCTRL_VFE;
|
|
IXGBE_WRITE_REG(hw, IXGBE_VLNCTRL, vlnctrl);
|
|
IXGBE_WRITE_REG(hw, IXGBE_VLNCTRL, vlnctrl);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -4125,6 +4126,10 @@ static void ixgbe_vlan_promisc_enable(struct ixgbe_adapter *adapter)
|
|
/* Set flag so we don't redo unnecessary work */
|
|
/* Set flag so we don't redo unnecessary work */
|
|
adapter->flags2 |= IXGBE_FLAG2_VLAN_PROMISC;
|
|
adapter->flags2 |= IXGBE_FLAG2_VLAN_PROMISC;
|
|
|
|
|
|
|
|
+ /* For VMDq and SR-IOV we must leave VLAN filtering enabled */
|
|
|
|
+ vlnctrl |= IXGBE_VLNCTRL_VFE;
|
|
|
|
+ IXGBE_WRITE_REG(hw, IXGBE_VLNCTRL, vlnctrl);
|
|
|
|
+
|
|
/* Add PF to all active pools */
|
|
/* Add PF to all active pools */
|
|
for (i = IXGBE_VLVF_ENTRIES; --i;) {
|
|
for (i = IXGBE_VLVF_ENTRIES; --i;) {
|
|
u32 reg_offset = IXGBE_VLVFB(i * 2 + VMDQ_P(0) / 32);
|
|
u32 reg_offset = IXGBE_VLVFB(i * 2 + VMDQ_P(0) / 32);
|
|
@@ -4191,6 +4196,11 @@ static void ixgbe_vlan_promisc_disable(struct ixgbe_adapter *adapter)
|
|
struct ixgbe_hw *hw = &adapter->hw;
|
|
struct ixgbe_hw *hw = &adapter->hw;
|
|
u32 vlnctrl, i;
|
|
u32 vlnctrl, i;
|
|
|
|
|
|
|
|
+ /* Set VLAN filtering to enabled */
|
|
|
|
+ vlnctrl = IXGBE_READ_REG(hw, IXGBE_VLNCTRL);
|
|
|
|
+ vlnctrl |= IXGBE_VLNCTRL_VFE;
|
|
|
|
+ IXGBE_WRITE_REG(hw, IXGBE_VLNCTRL, vlnctrl);
|
|
|
|
+
|
|
switch (hw->mac.type) {
|
|
switch (hw->mac.type) {
|
|
case ixgbe_mac_82599EB:
|
|
case ixgbe_mac_82599EB:
|
|
case ixgbe_mac_X540:
|
|
case ixgbe_mac_X540:
|
|
@@ -4202,10 +4212,6 @@ static void ixgbe_vlan_promisc_disable(struct ixgbe_adapter *adapter)
|
|
break;
|
|
break;
|
|
/* fall through */
|
|
/* fall through */
|
|
case ixgbe_mac_82598EB:
|
|
case ixgbe_mac_82598EB:
|
|
- vlnctrl = IXGBE_READ_REG(hw, IXGBE_VLNCTRL);
|
|
|
|
- vlnctrl &= ~IXGBE_VLNCTRL_CFIEN;
|
|
|
|
- vlnctrl |= IXGBE_VLNCTRL_VFE;
|
|
|
|
- IXGBE_WRITE_REG(hw, IXGBE_VLNCTRL, vlnctrl);
|
|
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|