Skip to content

Commit d09f698

Browse files
Sathya Perladavem330
authored andcommitted
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: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent a9b3cd7 commit d09f698

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/net/benet/be_main.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2217,7 +2217,6 @@ static int be_close(struct net_device *netdev)
22172217

22182218
be_async_mcc_disable(adapter);
22192219

2220-
netif_carrier_off(netdev);
22212220
adapter->link_up = false;
22222221

22232222
if (!lancer_chip(adapter))
@@ -3345,7 +3344,6 @@ static int __devinit be_probe(struct pci_dev *pdev,
33453344
status = register_netdev(netdev);
33463345
if (status != 0)
33473346
goto unsetup;
3348-
netif_carrier_off(netdev);
33493347

33503348
if (be_physfn(adapter) && adapter->sriov_enabled) {
33513349
u8 mac_speed;

0 commit comments

Comments
 (0)