-
Mike Waychison authored
We've recently noticed that the autonegotiation cleanup made a while back (between tg3 3.8 and 3.9) has issues which make the link bounce up and down. I've traced it to be caused by the tg3_timer 1 second work noticing that MAC_STATUS_LNKSTATE_CHANGED was set, which driver would see as the link going down. Upon further inspection, it appears that we don't wait long enough between setting SG_DIG_CTRL and reading the SG_DIG_STATUS for the result. The following patch (from a quasi recent bk tree) makes this code path wait up to 200ms for the link to establish. In my testing, I'm seeing it take around 20ms for the negotiation to complete. I haven't had the chance to test how this patch affects the case where the switch doesn't have autoneg enabled, although I suspect fallback should work correctly. Please consider applying, thanks, Signed-off-by: Mike Waychison <michael.waychison@sun.com> Signed-off-by: David S. Miller <davem@davemloft.net>
a11ddcf3