diff options
author | Sathya Perla <sathyap@serverengines.com> | 2009-03-20 02:56:46 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-20 02:56:46 -0400 |
commit | 1ab1ab7543de53c945ea24140409ef67ed173eb4 (patch) | |
tree | d9506f9bcbf3064368172030edc8c837f9c9a234 /drivers/net | |
parent | ea1dae11e0baca5d633207fe50fc3cd30a5d68ee (diff) |
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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/benet/be_main.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c index 80fe1e055d91..0ecaffb70e58 100644 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c | |||
@@ -473,7 +473,7 @@ static int be_change_mtu(struct net_device *netdev, int new_mtu) | |||
473 | * program them in BE. If more than BE_NUM_VLANS_SUPPORTED are configured, | 473 | * program them in BE. If more than BE_NUM_VLANS_SUPPORTED are configured, |
474 | * set the BE in promiscuous VLAN mode. | 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 | struct be_adapter *adapter = netdev_priv(netdev); | 478 | struct be_adapter *adapter = netdev_priv(netdev); |
479 | u16 vtag[BE_NUM_VLANS_SUPPORTED]; | 479 | u16 vtag[BE_NUM_VLANS_SUPPORTED]; |
@@ -516,7 +516,7 @@ static void be_vlan_add_vid(struct net_device *netdev, u16 vid) | |||
516 | adapter->num_vlans++; | 516 | adapter->num_vlans++; |
517 | adapter->vlan_tag[vid] = 1; | 517 | adapter->vlan_tag[vid] = 1; |
518 | 518 | ||
519 | be_vids_config(netdev); | 519 | be_vid_config(netdev); |
520 | } | 520 | } |
521 | 521 | ||
522 | static void be_vlan_rem_vid(struct net_device *netdev, u16 vid) | 522 | static void be_vlan_rem_vid(struct net_device *netdev, u16 vid) |
@@ -527,7 +527,7 @@ static void be_vlan_rem_vid(struct net_device *netdev, u16 vid) | |||
527 | adapter->vlan_tag[vid] = 0; | 527 | adapter->vlan_tag[vid] = 0; |
528 | 528 | ||
529 | vlan_group_set_device(adapter->vlan_grp, vid, NULL); | 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 | static void be_set_multicast_filter(struct net_device *netdev) | 533 | static void be_set_multicast_filter(struct net_device *netdev) |
@@ -1430,6 +1430,8 @@ static int be_open(struct net_device *netdev) | |||
1430 | if (status != 0) | 1430 | if (status != 0) |
1431 | goto do_none; | 1431 | goto do_none; |
1432 | 1432 | ||
1433 | be_vid_config(netdev); | ||
1434 | |||
1433 | status = be_cmd_set_flow_control(ctrl, true, true); | 1435 | status = be_cmd_set_flow_control(ctrl, true, true); |
1434 | if (status != 0) | 1436 | if (status != 0) |
1435 | goto if_destroy; | 1437 | goto if_destroy; |
@@ -1864,8 +1866,6 @@ static int be_resume(struct pci_dev *pdev) | |||
1864 | pci_set_power_state(pdev, 0); | 1866 | pci_set_power_state(pdev, 0); |
1865 | pci_restore_state(pdev); | 1867 | pci_restore_state(pdev); |
1866 | 1868 | ||
1867 | be_vids_config(netdev); | ||
1868 | |||
1869 | if (netif_running(netdev)) { | 1869 | if (netif_running(netdev)) { |
1870 | rtnl_lock(); | 1870 | rtnl_lock(); |
1871 | be_open(netdev); | 1871 | be_open(netdev); |