Commit 52a1dd4d authored by Alexander Duyck's avatar Alexander Duyck Committed by David S. Miller

igb: cleanup usage of virtualization registers

The igb driver was incorrectly attempting to write to registers that do not
exist on 82580 hardware.  This wasn't causing any issues that I can tell,
but it is not recommended behavior either so I have changed this so we are
determining which registers to write to based on mac type.
Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 411f557c
...@@ -6137,19 +6137,23 @@ static void igb_vmm_control(struct igb_adapter *adapter) ...@@ -6137,19 +6137,23 @@ static void igb_vmm_control(struct igb_adapter *adapter)
struct e1000_hw *hw = &adapter->hw; struct e1000_hw *hw = &adapter->hw;
u32 reg; u32 reg;
/* replication is not supported for 82575 */ switch (hw->mac.type) {
if (hw->mac.type == e1000_82575) case e1000_82575:
default:
/* replication is not supported for 82575 */
return; return;
case e1000_82576:
/* enable replication vlan tag stripping */ /* notify HW that the MAC is adding vlan tags */
reg = rd32(E1000_RPLOLR); reg = rd32(E1000_DTXCTL);
reg |= E1000_RPLOLR_STRVLAN; reg |= E1000_DTXCTL_VLAN_ADDED;
wr32(E1000_RPLOLR, reg); wr32(E1000_DTXCTL, reg);
case e1000_82580:
/* notify HW that the MAC is adding vlan tags */ /* enable replication vlan tag stripping */
reg = rd32(E1000_DTXCTL); reg = rd32(E1000_RPLOLR);
reg |= E1000_DTXCTL_VLAN_ADDED; reg |= E1000_RPLOLR_STRVLAN;
wr32(E1000_DTXCTL, reg); wr32(E1000_RPLOLR, reg);
break;
}
if (adapter->vfs_allocated_count) { if (adapter->vfs_allocated_count) {
igb_vmdq_set_loopback_pf(hw, true); igb_vmdq_set_loopback_pf(hw, true);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment