--- tg3.c.orig 2004-09-10 13:24:28.000000000 +0100 +++ tg3.c 2004-09-10 13:24:14.000000000 +0100 @@ -2051,9 +2051,25 @@ break; udelay(1); } - if (tick >= 195000) - printk(KERN_INFO PFX "%s: HW autoneg failed !\n", + if (tick >= 195000) { + u32 digctrl, txctrl; + + printk(KERN_INFO PFX + "%s: HW autoneg failed - disabled\n", tp->dev->name); + + digctrl = tr32(SG_DIG_CTRL); + digctrl &= ~SG_DIG_USING_HW_AUTONEG; + + txctrl = tr32(MAC_SERDES_CFG); + txctrl &= ~MAC_SERDES_CFG_EDGE_SELECT; + tw32_f(MAC_SERDES_CFG, txctrl); + tw32_f(SG_DIG_CTRL, digctrl | SG_DIG_SOFT_RESET); + udelay(5); + tw32_f(SG_DIG_CTRL, digctrl); + + tp->tg3_flags2 &= ~TG3_FLG2_HW_AUTONEG; + } } /* Reset when initting first time or we have a link. */ @@ -5280,7 +5296,6 @@ txctrl = tr32(MAC_SERDES_CFG); tw32_f(MAC_SERDES_CFG, txctrl | MAC_SERDES_CFG_EDGE_SELECT); tw32_f(SG_DIG_CTRL, digctrl | SG_DIG_SOFT_RESET); - tr32(SG_DIG_CTRL); udelay(5); tw32_f(SG_DIG_CTRL, digctrl);