From: Jeff Mahoney Move the netif_carrier_off() call from tg3_init_one()-> tg3_init_link_config() to tg3_open() as is the convention for most other network drivers. I was getting a panic after a tg3 device failed to initialize due to DMA failure. The oops pointed to the link watch queue with spinlock debugging enabled. Without spinlock debugging, the Oops didn't occur. I suspect that the link event was getting queued but not executed until after the DMA test had failed and the device was freed. The link event was then operating on freed memory, which could contain anything. With this patch applied, the Oops no longer occurs. Signed-off-by: Jeff Mahoney Cc: Jeff Garzik Cc: "David S. Miller" Signed-off-by: Andrew Morton --- drivers/net/tg3.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) diff -puN drivers/net/tg3.c~tg3-netif_carrier_off-runs-too-early-could-still-be-queued-when-init-fails drivers/net/tg3.c --- devel/drivers/net/tg3.c~tg3-netif_carrier_off-runs-too-early-could-still-be-queued-when-init-fails 2006-02-27 20:57:12.000000000 -0800 +++ devel-akpm/drivers/net/tg3.c 2006-02-27 20:57:12.000000000 -0800 @@ -6443,6 +6443,8 @@ static int tg3_open(struct net_device *d struct tg3 *tp = netdev_priv(dev); int err; + netif_carrier_off(tp->dev); + tg3_full_lock(tp, 0); tg3_disable_ints(tp); @@ -10430,7 +10432,6 @@ static void __devinit tg3_init_link_conf tp->link_config.speed = SPEED_INVALID; tp->link_config.duplex = DUPLEX_INVALID; tp->link_config.autoneg = AUTONEG_ENABLE; - netif_carrier_off(tp->dev); tp->link_config.active_speed = SPEED_INVALID; tp->link_config.active_duplex = DUPLEX_INVALID; tp->link_config.phy_is_low_power = 0; _