Skip to content

Commit 12b56ea

Browse files
Eilon Greensteindavem330
authored andcommitted
bnx2x: Calling netif_carrier_off at the end of the probe
netif_carrier_off was called too early at the probe. In case of failure or simply bad timing, this can cause a fatal error since linkwatch_event might run too soon. Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 7d96567 commit 12b56ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/bnx2x_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10206,8 +10206,6 @@ static int __devinit bnx2x_init_one(struct pci_dev *pdev,
1020610206
return -ENOMEM;
1020710207
}
1020810208

10209-
netif_carrier_off(dev);
10210-
1021110209
bp = netdev_priv(dev);
1021210210
bp->msglevel = debug;
1021310211

@@ -10231,6 +10229,8 @@ static int __devinit bnx2x_init_one(struct pci_dev *pdev,
1023110229
goto init_one_exit;
1023210230
}
1023310231

10232+
netif_carrier_off(dev);
10233+
1023410234
bp->common.name = board_info[ent->driver_data].name;
1023510235
printk(KERN_INFO "%s: %s (%c%d) PCI-E x%d %s found at mem %lx,"
1023610236
" IRQ %d, ", dev->name, bp->common.name,

0 commit comments

Comments
 (0)