diff options
| author | Emil Tantilov <emil.s.tantilov@intel.com> | 2014-12-10 00:28:51 -0500 |
|---|---|---|
| committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2015-02-05 22:57:47 -0500 |
| commit | 42ce2c8ef6a9bc1459965f8a5a1e7a87049ef1af (patch) | |
| tree | b38f4b354fce6e78adf43906ca0639748a4f7f86 | |
| parent | 9295edb472dcd85cb27d2f23dc2e6bae054a0228 (diff) | |
ixgbe: fix setting port VLAN
This patch fixes couple of issues introduced by
commit 2b509c0cd292 ("ixgbe: cleanup ixgbe_ndo_set_vf_vlan")
- fix setting of the VLAN inside ixgbe_enable_port_vlan()
- disable the "hide VLAN" bit in PFQDE when port VLAN is disabled
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| -rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c index a82a36bc789e..7f37fe7269a7 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | |||
| @@ -1094,14 +1094,12 @@ static int ixgbe_enable_port_vlan(struct ixgbe_adapter *adapter, int vf, | |||
| 1094 | u16 vlan, u8 qos) | 1094 | u16 vlan, u8 qos) |
| 1095 | { | 1095 | { |
| 1096 | struct ixgbe_hw *hw = &adapter->hw; | 1096 | struct ixgbe_hw *hw = &adapter->hw; |
| 1097 | int err = 0; | 1097 | int err; |
| 1098 | 1098 | ||
| 1099 | if (adapter->vfinfo[vf].pf_vlan) | 1099 | err = ixgbe_set_vf_vlan(adapter, true, vlan, vf); |
| 1100 | err = ixgbe_set_vf_vlan(adapter, false, | ||
| 1101 | adapter->vfinfo[vf].pf_vlan, | ||
| 1102 | vf); | ||
| 1103 | if (err) | 1100 | if (err) |
| 1104 | goto out; | 1101 | goto out; |
| 1102 | |||
| 1105 | ixgbe_set_vmvir(adapter, vlan, qos, vf); | 1103 | ixgbe_set_vmvir(adapter, vlan, qos, vf); |
| 1106 | ixgbe_set_vmolr(hw, vf, false); | 1104 | ixgbe_set_vmolr(hw, vf, false); |
| 1107 | if (adapter->vfinfo[vf].spoofchk_enabled) | 1105 | if (adapter->vfinfo[vf].spoofchk_enabled) |
| @@ -1140,6 +1138,11 @@ static int ixgbe_disable_port_vlan(struct ixgbe_adapter *adapter, int vf) | |||
| 1140 | hw->mac.ops.set_vlan_anti_spoofing(hw, false, vf); | 1138 | hw->mac.ops.set_vlan_anti_spoofing(hw, false, vf); |
| 1141 | if (adapter->vfinfo[vf].vlan_count) | 1139 | if (adapter->vfinfo[vf].vlan_count) |
| 1142 | adapter->vfinfo[vf].vlan_count--; | 1140 | adapter->vfinfo[vf].vlan_count--; |
| 1141 | |||
| 1142 | /* disable hide VLAN on X550 */ | ||
| 1143 | if (hw->mac.type >= ixgbe_mac_X550) | ||
| 1144 | ixgbe_write_qde(adapter, vf, IXGBE_QDE_ENABLE); | ||
| 1145 | |||
| 1143 | adapter->vfinfo[vf].pf_vlan = 0; | 1146 | adapter->vfinfo[vf].pf_vlan = 0; |
| 1144 | adapter->vfinfo[vf].pf_qos = 0; | 1147 | adapter->vfinfo[vf].pf_qos = 0; |
| 1145 | 1148 | ||
