Fw: [PATCH] ucc_geth: Correct fixed_link OOPS.

Joakim Tjernlund Joakim.Tjernlund at transmode.se
Sat Mar 21 07:46:13 EST 2009


Anton Vorontsov <avorontsov at ru.mvista.com> wrote on 20/03/2009 21:07:40:
> 
> On Fri, Mar 20, 2009 at 08:43:56PM +0100, Joakim Tjernlund wrote:
> > hmm, this mail didn't seem to reach the lists. Resending
> > 
> >  Jocke
> > ----- Forwarded by Joakim Tjernlund/Transmode on 20/03/2009 20:42 
-----
> > 
> > From:
> > Joakim Tjernlund <Joakim.Tjernlund at transmode.se>
> > To:
> > leoli at freescale.com, netdev at vger.kernel.org, linuxppc-dev at ozlabs.org
> > Cc:
> > Joakim Tjernlund <Joakim.Tjernlund at transmode.se>
> > Date:
> > 20/03/2009 18:01
> > Subject:
> > [PATCH] ucc_geth: Correct fixed_link OOPS.
> > 
> > 
> > 
> > fixed_link(PHY less) mode will get you an NULL
> > deference as it does not have a phy-handle.
> > Correct by using already probed information.
> > 
> > Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund at transmode.se>
> > ---
> > 
> > The below fixes the problem and seems like the right thing to do.
> > Can we have this in 2.6.29?
> > 
> >  drivers/net/ucc_geth.c |   17 +----------------
> >  1 files changed, 1 insertions(+), 16 deletions(-)

[SNIP]

> 
> This effectivly breaks boards where Gianfar is using UCC's MDIO
> bus (i.e. breaks commit b1c4a9dddf09fe99b8f88252718ac5b357363dc4,
> which is the cause of fixed-link breakage, btw). And, your patch
> is line-wrapped and tabs are substituted by white spaces...

Yes, I noticed that afterwards. It is our "great" new mailsystem
that gets in the way. I really need to find another mailsystem as
Lotus/Domino gets in my way too often :(

> 
> I would suggest something along these lines (unfortunately
> right now I can't test it on real HW, only compile-tested):

Tested here, works fine for fixed-link PHYs, thanks.
I left the 
    priv->oldlink = 0;
    priv->oldspeed = 0;
    priv->oldduplex = -1;
in though. Seemed like a good idea.

Tested By: Joakim Tjernlund <Joakim.Tjernlund at transmode.se>

 Jocke




More information about the Linuxppc-dev mailing list