]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
bnx2x: Calling netif_carrier_off at the end of the probe
authorEilon Greenstein <eilong@broadcom.com>
Tue, 4 Nov 2008 00:46:40 +0000 (16:46 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 4 Nov 2008 00:46:40 +0000 (16:46 -0800)
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>
drivers/net/bnx2x_main.c

index 61152e149e676ad6c917ec0e36a8be90e6c9a663..5b013d8457c580fa8f4a982ccf7ab58431ac30c8 100644 (file)
@@ -10206,8 +10206,6 @@ static int __devinit bnx2x_init_one(struct pci_dev *pdev,
                return -ENOMEM;
        }
 
-       netif_carrier_off(dev);
-
        bp = netdev_priv(dev);
        bp->msglevel = debug;
 
@@ -10231,6 +10229,8 @@ static int __devinit bnx2x_init_one(struct pci_dev *pdev,
                goto init_one_exit;
        }
 
+       netif_carrier_off(dev);
+
        bp->common.name = board_info[ent->driver_data].name;
        printk(KERN_INFO "%s: %s (%c%d) PCI-E x%d %s found at mem %lx,"
               " IRQ %d, ", dev->name, bp->common.name,