[patch 07/46] bnx2x: Calling netif_carrier_off at the end of the probe

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Greg KH
Date: Monday, November 17, 2008 - 12:14 am

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Eilon Greenstein <eilong@broadcom.com>

commit 12b56ea89e70d4b04f2f5199750310e82894ebbd upstream.

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>
Cc: Alex Chiang <achiang@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/bnx2x_main.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -10205,8 +10205,6 @@ static int __devinit bnx2x_init_one(stru
 		return -ENOMEM;
 	}
 
-	netif_carrier_off(dev);
-
 	bp = netdev_priv(dev);
 	bp->msglevel = debug;
 
@@ -10230,6 +10228,8 @@ static int __devinit bnx2x_init_one(stru
 		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,

-- 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 00/46] 2.6.27.7-stable review, Greg KH, (Mon Nov 17, 12:13 am)
[patch 07/46] bnx2x: Calling netif_carrier_off at the end ..., Greg KH, (Mon Nov 17, 12:14 am)
[patch 14/46] rtl8187: Add Abocom USB ID, Greg KH, (Mon Nov 17, 12:15 am)
[patch 21/46] r8169: select MII in Kconfig, Greg KH, (Mon Nov 17, 12:15 am)
[patch 26/46] S390: cpu topology: fix locking, Greg KH, (Mon Nov 17, 12:15 am)
[patch 35/46] USB: gadget: cdc-acm deadlock fix, Greg KH, (Mon Nov 17, 12:16 am)
[patch 37/46] USB: Fix PS3 USB shutdown problems, Greg KH, (Mon Nov 17, 12:16 am)
[patch 39/46] USB: EHCI: fix divide-by-zero bug, Greg KH, (Mon Nov 17, 12:16 am)
[patch 42/46] ACPI: EC: revert msleep patch, Greg KH, (Mon Nov 17, 12:17 am)
[patch 43/46] ACPI: EC: wait for last write gpe, Greg KH, (Mon Nov 17, 12:17 am)
[patch 44/46] ACPI: EC: restart failed command, Greg KH, (Mon Nov 17, 12:17 am)
Re: [patch 25/46] V4L/DVB (9624): CVE-2008-5033: fix OOPS ..., Mauro Carvalho Chehab, (Mon Nov 17, 6:31 am)
Re: [stable] [patch 24/46] Fix broken ownership of /proc/s ..., Rafael J. Wysocki, (Mon Nov 17, 3:25 pm)