aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/benet/be_main.c
diff options
context:
space:
mode:
authorAjit Khaparde <ajit.khaparde@emulex.com>2011-02-11 08:35:41 -0500
committerDavid S. Miller <davem@davemloft.net>2011-02-12 00:14:44 -0500
commite63193652bfbea40e33b3a4cf4d338f9c82fbc05 (patch)
tree0034593dfb33d79a4183e7ac70af964bb5692650 /drivers/net/benet/be_main.c
parentc99ac3e7e47ffb9e504d9b08f608e9d7519a6b4f (diff)
be2net: call be_vf_eth_addr_config() after register_netdev
This is to avoid the completion processing for be_vf_eth_addr_config to consume the link status notification before netdev_register. Otherwise this causes the PF miss its first link status update. Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/benet/be_main.c')
-rw-r--r--drivers/net/benet/be_main.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index c8075c1779bb..48eef9e2ed94 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -2317,19 +2317,10 @@ static int be_setup(struct be_adapter *adapter)
2317 if (status != 0) 2317 if (status != 0)
2318 goto rx_qs_destroy; 2318 goto rx_qs_destroy;
2319 2319
2320 if (be_physfn(adapter) && adapter->sriov_enabled) {
2321 status = be_vf_eth_addr_config(adapter);
2322 if (status)
2323 goto mcc_q_destroy;
2324 }
2325
2326 adapter->link_speed = -1; 2320 adapter->link_speed = -1;
2327 2321
2328 return 0; 2322 return 0;
2329 2323
2330mcc_q_destroy:
2331 if (be_physfn(adapter))
2332 be_vf_eth_addr_rem(adapter);
2333 be_mcc_queues_destroy(adapter); 2324 be_mcc_queues_destroy(adapter);
2334rx_qs_destroy: 2325rx_qs_destroy:
2335 be_rx_queues_destroy(adapter); 2326 be_rx_queues_destroy(adapter);
@@ -2985,10 +2976,18 @@ static int __devinit be_probe(struct pci_dev *pdev,
2985 goto unsetup; 2976 goto unsetup;
2986 netif_carrier_off(netdev); 2977 netif_carrier_off(netdev);
2987 2978
2979 if (be_physfn(adapter) && adapter->sriov_enabled) {
2980 status = be_vf_eth_addr_config(adapter);
2981 if (status)
2982 goto unreg_netdev;
2983 }
2984
2988 dev_info(&pdev->dev, "%s port %d\n", nic_name(pdev), adapter->port_num); 2985 dev_info(&pdev->dev, "%s port %d\n", nic_name(pdev), adapter->port_num);
2989 schedule_delayed_work(&adapter->work, msecs_to_jiffies(100)); 2986 schedule_delayed_work(&adapter->work, msecs_to_jiffies(100));
2990 return 0; 2987 return 0;
2991 2988
2989unreg_netdev:
2990 unregister_netdev(netdev);
2992unsetup: 2991unsetup:
2993 be_clear(adapter); 2992 be_clear(adapter);
2994msix_disable: 2993msix_disable: