diff options
author | Somnath Kotur <somnath.kotur@emulex.com> | 2010-10-24 21:11:10 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-25 15:14:10 -0400 |
commit | 63a76944b674bb758232e4213da0da95ae055012 (patch) | |
tree | 70b0389ed576a06cb193a47d15daa7b66b3bf048 | |
parent | 18edc84cf15cbe114dcdf7e8612ee52586d0aad7 (diff) |
be2net: Call netif_carier_off() after register_netdev()
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>
-rw-r--r-- | drivers/net/benet/be_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c index 12486260c928..87673558cde5 100644 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c | |||
@@ -2556,7 +2556,6 @@ static void be_netdev_init(struct net_device *netdev) | |||
2556 | netif_napi_add(netdev, &adapter->tx_eq.napi, be_poll_tx_mcc, | 2556 | netif_napi_add(netdev, &adapter->tx_eq.napi, be_poll_tx_mcc, |
2557 | BE_NAPI_WEIGHT); | 2557 | BE_NAPI_WEIGHT); |
2558 | 2558 | ||
2559 | netif_carrier_off(netdev); | ||
2560 | netif_stop_queue(netdev); | 2559 | netif_stop_queue(netdev); |
2561 | } | 2560 | } |
2562 | 2561 | ||
@@ -2865,6 +2864,7 @@ static int __devinit be_probe(struct pci_dev *pdev, | |||
2865 | status = register_netdev(netdev); | 2864 | status = register_netdev(netdev); |
2866 | if (status != 0) | 2865 | if (status != 0) |
2867 | goto unsetup; | 2866 | goto unsetup; |
2867 | netif_carrier_off(netdev); | ||
2868 | 2868 | ||
2869 | dev_info(&pdev->dev, "%s port %d\n", nic_name(pdev), adapter->port_num); | 2869 | dev_info(&pdev->dev, "%s port %d\n", nic_name(pdev), adapter->port_num); |
2870 | return 0; | 2870 | return 0; |