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

From: Greg KH
Date: Mon Nov 17 2008 - 02:23:12 EST


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

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

From: Eilon Greenstein <eilong@xxxxxxxxxxxx>

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@xxxxxxxxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
Cc: Alex Chiang <achiang@xxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
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,

--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/