Commit 1ab1ab7543de53c945ea24140409ef67ed173eb4

Authored by Sathya Perla
Committed by David S. Miller
1 parent ea1dae11e0

be2net: fix to restore vlan ids into BE2 during a IF DOWN->UP cycle

This is a patch to reconfigure vlan-ids during an i/f down/up cycle

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 5 additions and 5 deletions Side-by-side Diff

drivers/net/benet/be_main.c
... ... @@ -473,7 +473,7 @@
473 473 * program them in BE. If more than BE_NUM_VLANS_SUPPORTED are configured,
474 474 * set the BE in promiscuous VLAN mode.
475 475 */
476   -static void be_vids_config(struct net_device *netdev)
  476 +static void be_vid_config(struct net_device *netdev)
477 477 {
478 478 struct be_adapter *adapter = netdev_priv(netdev);
479 479 u16 vtag[BE_NUM_VLANS_SUPPORTED];
... ... @@ -516,7 +516,7 @@
516 516 adapter->num_vlans++;
517 517 adapter->vlan_tag[vid] = 1;
518 518  
519   - be_vids_config(netdev);
  519 + be_vid_config(netdev);
520 520 }
521 521  
522 522 static void be_vlan_rem_vid(struct net_device *netdev, u16 vid)
... ... @@ -527,7 +527,7 @@
527 527 adapter->vlan_tag[vid] = 0;
528 528  
529 529 vlan_group_set_device(adapter->vlan_grp, vid, NULL);
530   - be_vids_config(netdev);
  530 + be_vid_config(netdev);
531 531 }
532 532  
533 533 static void be_set_multicast_filter(struct net_device *netdev)
... ... @@ -1430,6 +1430,8 @@
1430 1430 if (status != 0)
1431 1431 goto do_none;
1432 1432  
  1433 + be_vid_config(netdev);
  1434 +
1433 1435 status = be_cmd_set_flow_control(ctrl, true, true);
1434 1436 if (status != 0)
1435 1437 goto if_destroy;
... ... @@ -1863,8 +1865,6 @@
1863 1865  
1864 1866 pci_set_power_state(pdev, 0);
1865 1867 pci_restore_state(pdev);
1866   -
1867   - be_vids_config(netdev);
1868 1868  
1869 1869 if (netif_running(netdev)) {
1870 1870 rtnl_lock();