Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266494
b: refs/heads/master
c: 5faf030
h: refs/heads/master
v: v3
  • Loading branch information
Alexander Duyck authored and Jeff Kirsher committed Oct 8, 2011
1 parent 8e11a67 commit b2e3d42
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3ceb90fd4898853cdac43084f0c6ee7270cb15f3
refs/heads/master: 5faf030c9b6cc48c33301b4f3341f2b5c374f6b5
18 changes: 4 additions & 14 deletions trunk/drivers/net/ethernet/intel/igb/igb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2112,8 +2112,6 @@ static int __devinit igb_probe(struct pci_dev *pdev,
if (err)
goto err_register;

igb_vlan_mode(netdev, netdev->features);

/* carrier off reporting is important to ethtool even BEFORE open */
netif_carrier_off(netdev);

Expand Down Expand Up @@ -5120,7 +5118,6 @@ static s32 igb_vlvf_set(struct igb_adapter *adapter, u32 vid, bool add, u32 vf)
}

adapter->vf_data[vf].vlans_enabled++;
return 0;
}
} else {
if (i < E1000_VLVF_ARRAY_SIZE) {
Expand Down Expand Up @@ -6385,10 +6382,9 @@ static void igb_vlan_mode(struct net_device *netdev, u32 features)
struct igb_adapter *adapter = netdev_priv(netdev);
struct e1000_hw *hw = &adapter->hw;
u32 ctrl, rctl;
bool enable = !!(features & NETIF_F_HW_VLAN_RX);

igb_irq_disable(adapter);

if (features & NETIF_F_HW_VLAN_RX) {
if (enable) {
/* enable VLAN tag insert/strip */
ctrl = rd32(E1000_CTRL);
ctrl |= E1000_CTRL_VME;
Expand All @@ -6406,9 +6402,6 @@ static void igb_vlan_mode(struct net_device *netdev, u32 features)
}

igb_rlpml_set(adapter);

if (!test_bit(__IGB_DOWN, &adapter->state))
igb_irq_enable(adapter);
}

static void igb_vlan_rx_add_vid(struct net_device *netdev, u16 vid)
Expand All @@ -6433,11 +6426,6 @@ static void igb_vlan_rx_kill_vid(struct net_device *netdev, u16 vid)
int pf_id = adapter->vfs_allocated_count;
s32 err;

igb_irq_disable(adapter);

if (!test_bit(__IGB_DOWN, &adapter->state))
igb_irq_enable(adapter);

/* remove vlan from VLVF table array */
err = igb_vlvf_set(adapter, vid, false, pf_id);

Expand All @@ -6452,6 +6440,8 @@ static void igb_restore_vlan(struct igb_adapter *adapter)
{
u16 vid;

igb_vlan_mode(adapter->netdev, adapter->netdev->features);

for_each_set_bit(vid, adapter->active_vlans, VLAN_N_VID)
igb_vlan_rx_add_vid(adapter->netdev, vid);
}
Expand Down

0 comments on commit b2e3d42

Please sign in to comment.