Skip to content

Commit

Permalink
be2net: Call netif_carier_off() after register_netdev()
Browse files Browse the repository at this point in the history
Calling netif_carrier_off before register_netdev was causing the network interface
to miss a linkwatch pending event leading to  an inconsistent state if the link
is not up when interface is initialized.This is now invoked after register_netdev.

Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Somnath Kotur authored and David S. Miller committed Oct 25, 2010
1 parent 18edc84 commit 63a7694
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2556,7 +2556,6 @@ static void be_netdev_init(struct net_device *netdev)
netif_napi_add(netdev, &adapter->tx_eq.napi, be_poll_tx_mcc,
BE_NAPI_WEIGHT);

netif_carrier_off(netdev);
netif_stop_queue(netdev);
}

Expand Down Expand Up @@ -2865,6 +2864,7 @@ static int __devinit be_probe(struct pci_dev *pdev,
status = register_netdev(netdev);
if (status != 0)
goto unsetup;
netif_carrier_off(netdev);

dev_info(&pdev->dev, "%s port %d\n", nic_name(pdev), adapter->port_num);
return 0;
Expand Down

0 comments on commit 63a7694

Please sign in to comment.