Commit d09f6980 authored by Sathya Perla's avatar Sathya Perla Committed by David S. Miller

be2net: remove wrong and unnecessary calls to netif_carrier_off()

1) In be_probe(), as soon as the MCC Q is created a gratuitous link status
event is received and processed. Accordingly netif_carrier_off/on() is called.
The extra netif_carrier_off() call in probe can race with this and cause wrong
state.

2) be_close() need not call netif_carrier_off(). It is OK to show the actual
link state even when the device is administratively down.
Signed-off-by: default avatarSathya Perla <sathya.perla@emulex.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a9b3cd7f
...@@ -2217,7 +2217,6 @@ static int be_close(struct net_device *netdev) ...@@ -2217,7 +2217,6 @@ static int be_close(struct net_device *netdev)
be_async_mcc_disable(adapter); be_async_mcc_disable(adapter);
netif_carrier_off(netdev);
adapter->link_up = false; adapter->link_up = false;
if (!lancer_chip(adapter)) if (!lancer_chip(adapter))
...@@ -3345,7 +3344,6 @@ static int __devinit be_probe(struct pci_dev *pdev, ...@@ -3345,7 +3344,6 @@ static int __devinit be_probe(struct pci_dev *pdev,
status = register_netdev(netdev); status = register_netdev(netdev);
if (status != 0) if (status != 0)
goto unsetup; goto unsetup;
netif_carrier_off(netdev);
if (be_physfn(adapter) && adapter->sriov_enabled) { if (be_physfn(adapter) && adapter->sriov_enabled) {
u8 mac_speed; u8 mac_speed;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment