--- old_kernel/drivers/net/gianfar.c 2005-06-21 10:57:29.000000000 +0900 +++ new_kernel/drivers/net/gianfar.c 2005-09-26 17:05:46.116951768 +0900 @@ -541,6 +541,14 @@ MII_INTERRUPT_DISABLED); } +/* following 2 steps is a attempting to prevent system hanging/panic + when executing ifconfig command. by Sun Zhitai, Sep. 26 2005 */ + + cancel_delayed_work(&priv->tq); + del_timer_sync(&priv->phy_info_timer); + +/* appended end */ + spin_unlock_irqrestore(&priv->lock, flags); /* Free the IRQs */ @@ -770,7 +778,7 @@ init_timer(&priv->phy_info_timer); priv->phy_info_timer.function = &gfar_phy_startup_timer; priv->phy_info_timer.data = (unsigned long) priv->mii_info; - mod_timer(&priv->phy_info_timer, jiffies + HZ); + __mod_timer(&priv->phy_info_timer, jiffies + HZ); /* Configure the coalescing support */ if (priv->txcoalescing) @@ -1500,7 +1508,7 @@ schedule_work(&priv->tq); - mod_timer(&priv->phy_info_timer, jiffies + + __mod_timer(&priv->phy_info_timer, jiffies + GFAR_PHY_CHANGE_TIME * HZ); } @@ -1523,7 +1531,7 @@ /* If autonegotiation failed to start, and * we haven't timed out, reset the timer, and return */ if (result && secondary--) { - mod_timer(&priv->phy_info_timer, jiffies + HZ); + __mod_timer(&priv->phy_info_timer, jiffies + HZ); return; } else if (result) { /* Couldn't start autonegotiation. @@ -1564,7 +1572,7 @@ init_timer(&priv->phy_info_timer); priv->phy_info_timer.function = &gfar_phy_timer; priv->phy_info_timer.data = (unsigned long) mii_info->dev; - mod_timer(&priv->phy_info_timer, jiffies + + __mod_timer(&priv->phy_info_timer, jiffies + GFAR_PHY_CHANGE_TIME * HZ); }