diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2009-11-23 01:32:57 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-23 13:45:16 -0500 |
commit | dc63d3771cc6492220f53caf5fded6090d45d9ce (patch) | |
tree | bfcbd3c54806ed077ebe284b409e4ab91744379c /drivers/net/ixgbe/ixgbe_main.c | |
parent | edd2ea5559737e5239d5c80fa1a55b8bc440470b (diff) |
ixgbe: Only set/clear VFE in ixgbe_set_rx_mode
There appears to be a stray setting of the VFE bit when registering vlans.
This should not be done as vlan filtering should be enabled any time the
interface is not in promiscous mode
Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@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/ixgbe/ixgbe_main.c')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index a3a2a9a3df81..5182b2893431 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -2336,23 +2336,25 @@ static void ixgbe_vlan_rx_register(struct net_device *netdev, | |||
2336 | * not in DCB mode. | 2336 | * not in DCB mode. |
2337 | */ | 2337 | */ |
2338 | ctrl = IXGBE_READ_REG(&adapter->hw, IXGBE_VLNCTRL); | 2338 | ctrl = IXGBE_READ_REG(&adapter->hw, IXGBE_VLNCTRL); |
2339 | |||
2340 | /* Disable CFI check */ | ||
2341 | ctrl &= ~IXGBE_VLNCTRL_CFIEN; | ||
2342 | |||
2343 | /* enable VLAN tag stripping */ | ||
2339 | if (adapter->hw.mac.type == ixgbe_mac_82598EB) { | 2344 | if (adapter->hw.mac.type == ixgbe_mac_82598EB) { |
2340 | ctrl |= IXGBE_VLNCTRL_VME | IXGBE_VLNCTRL_VFE; | 2345 | ctrl |= IXGBE_VLNCTRL_VME; |
2341 | ctrl &= ~IXGBE_VLNCTRL_CFIEN; | ||
2342 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_VLNCTRL, ctrl); | ||
2343 | } else if (adapter->hw.mac.type == ixgbe_mac_82599EB) { | 2346 | } else if (adapter->hw.mac.type == ixgbe_mac_82599EB) { |
2344 | ctrl |= IXGBE_VLNCTRL_VFE; | ||
2345 | /* enable VLAN tag insert/strip */ | ||
2346 | ctrl = IXGBE_READ_REG(&adapter->hw, IXGBE_VLNCTRL); | ||
2347 | ctrl &= ~IXGBE_VLNCTRL_CFIEN; | ||
2348 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_VLNCTRL, ctrl); | ||
2349 | for (i = 0; i < adapter->num_rx_queues; i++) { | 2347 | for (i = 0; i < adapter->num_rx_queues; i++) { |
2348 | u32 ctrl; | ||
2350 | j = adapter->rx_ring[i].reg_idx; | 2349 | j = adapter->rx_ring[i].reg_idx; |
2351 | ctrl = IXGBE_READ_REG(&adapter->hw, IXGBE_RXDCTL(j)); | 2350 | ctrl = IXGBE_READ_REG(&adapter->hw, IXGBE_RXDCTL(j)); |
2352 | ctrl |= IXGBE_RXDCTL_VME; | 2351 | ctrl |= IXGBE_RXDCTL_VME; |
2353 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_RXDCTL(j), ctrl); | 2352 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_RXDCTL(j), ctrl); |
2354 | } | 2353 | } |
2355 | } | 2354 | } |
2355 | |||
2356 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_VLNCTRL, ctrl); | ||
2357 | |||
2356 | ixgbe_vlan_rx_add_vid(netdev, 0); | 2358 | ixgbe_vlan_rx_add_vid(netdev, 0); |
2357 | 2359 | ||
2358 | if (!test_bit(__IXGBE_DOWN, &adapter->state)) | 2360 | if (!test_bit(__IXGBE_DOWN, &adapter->state)) |