summaryrefslogtreecommitdiffstats
path: root/drivers/net/benet
diff options
context:
space:
mode:
authorAjit Khaparde <ajit.khaparde@emulex.com>2011-02-11 13:35:41 +0000
committerDavid S. Miller <davem@davemloft.net>2011-02-11 21:14:44 -0800
commite63193652bfbea40e33b3a4cf4d338f9c82fbc05 (patch)
tree0034593dfb33d79a4183e7ac70af964bb5692650 /drivers/net/benet
parentc99ac3e7e47ffb9e504d9b08f608e9d7519a6b4f (diff)
downloadblackbird-obmc-linux-e63193652bfbea40e33b3a4cf4d338f9c82fbc05.tar.gz
blackbird-obmc-linux-e63193652bfbea40e33b3a4cf4d338f9c82fbc05.zip
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')
-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)
if (status != 0)
goto rx_qs_destroy;
- if (be_physfn(adapter) && adapter->sriov_enabled) {
- status = be_vf_eth_addr_config(adapter);
- if (status)
- goto mcc_q_destroy;
- }
-
adapter->link_speed = -1;
return 0;
-mcc_q_destroy:
- if (be_physfn(adapter))
- be_vf_eth_addr_rem(adapter);
be_mcc_queues_destroy(adapter);
rx_qs_destroy:
be_rx_queues_destroy(adapter);
@@ -2985,10 +2976,18 @@ static int __devinit be_probe(struct pci_dev *pdev,
goto unsetup;
netif_carrier_off(netdev);
+ if (be_physfn(adapter) && adapter->sriov_enabled) {
+ status = be_vf_eth_addr_config(adapter);
+ if (status)
+ goto unreg_netdev;
+ }
+
dev_info(&pdev->dev, "%s port %d\n", nic_name(pdev), adapter->port_num);
schedule_delayed_work(&adapter->work, msecs_to_jiffies(100));
return 0;
+unreg_netdev:
+ unregister_netdev(netdev);
unsetup:
be_clear(adapter);
msix_disable:
OpenPOWER on IntegriCloud