diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2009-10-27 15:54:04 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-28 01:20:36 -0700 |
commit | 10d8e9073a320a1c9cc13f996bd600b477eb4872 (patch) | |
tree | 111884291019fe9e6c8b44a49cde2acf89319558 /drivers/net/igb/igb_main.c | |
parent | d4960307ea63a5625a175cc2d7b192e68e6b4fba (diff) | |
download | lwn-10d8e9073a320a1c9cc13f996bd600b477eb4872.tar.gz lwn-10d8e9073a320a1c9cc13f996bd600b477eb4872.zip |
igb: setup vlan tag replication stripping in igb_vmm_control
This update adds vlan tag stripping for inter-vf communications to the
igb_vmm_control configuration function.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/igb/igb_main.c')
-rw-r--r-- | drivers/net/igb/igb_main.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index 24a119ec005d..9dd290cf754a 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c @@ -5799,11 +5799,22 @@ static int igb_set_vf_mac(struct igb_adapter *adapter, static void igb_vmm_control(struct igb_adapter *adapter) { struct e1000_hw *hw = &adapter->hw; + u32 reg; /* replication is not supported for 82575 */ if (hw->mac.type == e1000_82575) return; + /* enable replication vlan tag stripping */ + reg = rd32(E1000_RPLOLR); + reg |= E1000_RPLOLR_STRVLAN; + wr32(E1000_RPLOLR, reg); + + /* notify HW that the MAC is adding vlan tags */ + reg = rd32(E1000_DTXCTL); + reg |= E1000_DTXCTL_VLAN_ADDED; + wr32(E1000_DTXCTL, reg); + if (adapter->vfs_allocated_count) { igb_vmdq_set_loopback_pf(hw, true); igb_vmdq_set_replication_pf(hw, true); |