diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2009-10-27 11:54:04 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-28 04:20:36 -0400 |
commit | 10d8e9073a320a1c9cc13f996bd600b477eb4872 (patch) | |
tree | 111884291019fe9e6c8b44a49cde2acf89319558 /drivers/net/igb | |
parent | d4960307ea63a5625a175cc2d7b192e68e6b4fba (diff) |
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')
-rw-r--r-- | drivers/net/igb/e1000_82575.h | 9 | ||||
-rw-r--r-- | drivers/net/igb/igb_main.c | 11 |
2 files changed, 20 insertions, 0 deletions
diff --git a/drivers/net/igb/e1000_82575.h b/drivers/net/igb/e1000_82575.h index 7be3a0b6a057..9418683ed006 100644 --- a/drivers/net/igb/e1000_82575.h +++ b/drivers/net/igb/e1000_82575.h | |||
@@ -203,6 +203,15 @@ struct e1000_adv_tx_context_desc { | |||
203 | #define E1000_IOVCTL 0x05BBC | 203 | #define E1000_IOVCTL 0x05BBC |
204 | #define E1000_IOVCTL_REUSE_VFQ 0x00000001 | 204 | #define E1000_IOVCTL_REUSE_VFQ 0x00000001 |
205 | 205 | ||
206 | #define E1000_RPLOLR_STRVLAN 0x40000000 | ||
207 | #define E1000_RPLOLR_STRCRC 0x80000000 | ||
208 | |||
209 | #define E1000_DTXCTL_8023LL 0x0004 | ||
210 | #define E1000_DTXCTL_VLAN_ADDED 0x0008 | ||
211 | #define E1000_DTXCTL_OOS_ENABLE 0x0010 | ||
212 | #define E1000_DTXCTL_MDP_EN 0x0020 | ||
213 | #define E1000_DTXCTL_SPOOF_INT 0x0040 | ||
214 | |||
206 | #define ALL_QUEUES 0xFFFF | 215 | #define ALL_QUEUES 0xFFFF |
207 | 216 | ||
208 | void igb_vmdq_set_loopback_pf(struct e1000_hw *, bool); | 217 | void igb_vmdq_set_loopback_pf(struct e1000_hw *, bool); |
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, | |||
5799 | static void igb_vmm_control(struct igb_adapter *adapter) | 5799 | static void igb_vmm_control(struct igb_adapter *adapter) |
5800 | { | 5800 | { |
5801 | struct e1000_hw *hw = &adapter->hw; | 5801 | struct e1000_hw *hw = &adapter->hw; |
5802 | u32 reg; | ||
5802 | 5803 | ||
5803 | /* replication is not supported for 82575 */ | 5804 | /* replication is not supported for 82575 */ |
5804 | if (hw->mac.type == e1000_82575) | 5805 | if (hw->mac.type == e1000_82575) |
5805 | return; | 5806 | return; |
5806 | 5807 | ||
5808 | /* enable replication vlan tag stripping */ | ||
5809 | reg = rd32(E1000_RPLOLR); | ||
5810 | reg |= E1000_RPLOLR_STRVLAN; | ||
5811 | wr32(E1000_RPLOLR, reg); | ||
5812 | |||
5813 | /* notify HW that the MAC is adding vlan tags */ | ||
5814 | reg = rd32(E1000_DTXCTL); | ||
5815 | reg |= E1000_DTXCTL_VLAN_ADDED; | ||
5816 | wr32(E1000_DTXCTL, reg); | ||
5817 | |||
5807 | if (adapter->vfs_allocated_count) { | 5818 | if (adapter->vfs_allocated_count) { |
5808 | igb_vmdq_set_loopback_pf(hw, true); | 5819 | igb_vmdq_set_loopback_pf(hw, true); |
5809 | igb_vmdq_set_replication_pf(hw, true); | 5820 | igb_vmdq_set_replication_pf(hw, true); |