diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2010-03-22 10:07:46 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-22 21:30:04 -0400 |
commit | 52a1dd4d15cc28da5d3e9bfb1526c314d65fdff8 (patch) | |
tree | 04e3d0fecad1ab7ee0c7523eaed98cbe3fad5160 /drivers/net/igb/igb_main.c | |
parent | 411f557c3accbaa1e2b378d29aeaffffbec39ccc (diff) |
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: 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 | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index 45a0e4fd5871..3664915e3f7d 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c | |||
@@ -6137,19 +6137,23 @@ static void igb_vmm_control(struct igb_adapter *adapter) | |||
6137 | struct e1000_hw *hw = &adapter->hw; | 6137 | struct e1000_hw *hw = &adapter->hw; |
6138 | u32 reg; | 6138 | u32 reg; |
6139 | 6139 | ||
6140 | /* replication is not supported for 82575 */ | 6140 | switch (hw->mac.type) { |
6141 | if (hw->mac.type == e1000_82575) | 6141 | case e1000_82575: |
6142 | default: | ||
6143 | /* replication is not supported for 82575 */ | ||
6142 | return; | 6144 | return; |
6143 | 6145 | case e1000_82576: | |
6144 | /* enable replication vlan tag stripping */ | 6146 | /* notify HW that the MAC is adding vlan tags */ |
6145 | reg = rd32(E1000_RPLOLR); | 6147 | reg = rd32(E1000_DTXCTL); |
6146 | reg |= E1000_RPLOLR_STRVLAN; | 6148 | reg |= E1000_DTXCTL_VLAN_ADDED; |
6147 | wr32(E1000_RPLOLR, reg); | 6149 | wr32(E1000_DTXCTL, reg); |
6148 | 6150 | case e1000_82580: | |
6149 | /* notify HW that the MAC is adding vlan tags */ | 6151 | /* enable replication vlan tag stripping */ |
6150 | reg = rd32(E1000_DTXCTL); | 6152 | reg = rd32(E1000_RPLOLR); |
6151 | reg |= E1000_DTXCTL_VLAN_ADDED; | 6153 | reg |= E1000_RPLOLR_STRVLAN; |
6152 | wr32(E1000_DTXCTL, reg); | 6154 | wr32(E1000_RPLOLR, reg); |
6155 | break; | ||
6156 | } | ||
6153 | 6157 | ||
6154 | if (adapter->vfs_allocated_count) { | 6158 | if (adapter->vfs_allocated_count) { |
6155 | igb_vmdq_set_loopback_pf(hw, true); | 6159 | igb_vmdq_set_loopback_pf(hw, true); |