[U-Boot] [PATCH] Bugfix: mpc512x_fec MII accesses fail after ethernet transfers

Wolfgang Denk wd at denx.de
Thu Jul 23 21:29:56 CEST 2009


Dear Thomas Dörfler,

In message <4A637B05.4030306 at embedded-brains.de> you wrote:
>
> But I doubt that (re-)calling mpc512x_fec_init_phy before a MII command
> is run is really a good idea. Using the same code for initial init and
> repeated init makes sense, but this function in its current
> implementation also resets the PHY, which forces a new line negotiation
> to occur. IMHO this is NOT needed when we e.g. query the PHY status and
> it would even be contraproductive, if we would change some PHY register
> settings, because these changes would also be reset.

Agreed.

> What COULD make sense is to extract the MII speed register setting
> operation from mpc512x_fec_init_phy() and move it to the
> mpc512x_fec_mii_read/write functions. because this is where it is really
> needed.
>
> Does this make sense to you?

Yes, it does. But we should double-check if setting the MII_SPEED
register is all that should be (re-) initialized.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"We all agree on the necessity of compromise. We just can't agree  on
when it's necessary to compromise."
                - Larry Wall in  <1991Nov13.194420.28091 at netlabs.com>


More information about the U-Boot mailing list