Subject: Re: e100: Wait for PHY reset to complete?

From: Auke Kok <[email-masked]>
Date: Tue, 31 Oct 2006 10:34:38 -0800

Anders Grafström wrote:
>>> Anders Grafström wrote:
>>>> I ran mii-diag when the LEDs went out and the register dump
>>>> said it was in loopback. It is somewhat difficult reproduce.
>>>> It seems to be timing dependent, something else has to occur
>>>> at the same time.
>>>> I must confess I have only seen it with the 2.6.13 kernel.
>>>> I have not been able to reproduce it with 2.6.18.
>>>> But I have found no change in the driver that would fix it so
>>>> I suspect the problem is still there.
> 
> Now looking at mdio_ctrl(), which implements mdio_write() and mdio_read(),
> I see that this patch
> http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.15/2.6.15-mm3/broken-out/corruption-during-e100-mdi-register-access.patch
> most likely fixed the problem that I have experienced.
> 
> "although access to the MDI registers involves
> multiple steps which must not be intermixed, nothing was defending against
> two or more threads attempting simultaneous access.  The most obvious
> situation where such interference could occur involves the watchdog versus
> ioctl paths"
> 
> Sorry for the noise.

cool, thanks for digging that up and taking the time to report back ;)

Auke