[U-Boot] [PATCH] Bugfix: mpc512x_fec MII accesses fail after ethernet transfers
Thomas Dörfler
Thomas.Doerfler at embedded-brains.de
Sun Jul 19 19:51:27 CEST 2009
Hello,
on our custom MPC5121 board I used the following sequence to see the bug:
- After U-Boot stated, I could inspect the status of the PHY with "mii
info". This works fine even if repeated.
- then I trigger some network activity, for example with "ping"
- if I try to get the PHY status with "mii info" AFTER that network
activity, the command fails (it does not even detect, that a PHY is
connected).
The reason I could track down is, that:
- the FEC driver performs a FEC reset before the initial packet is
transmitted
- this reset also clears the MII speed register, which defines the
communication speed on MDC/MDIO
- the PHY access works again, when the MII speed register is set to its
proper value.
I have tested this behaviour on a old (M34K) mask, but I am sure it
applies also to the current M36P.
wkr,
Thomas Doerfler.
Wolfgang Denk wrote:
> Dear =?ISO-8859-15?Q?Thomas_D=F6rfler?=,
>
> In message <4A633D5A.3060803 at embedded-brains.de> you wrote:
>> The mpc512x FEC network driver resets the FEC before transferring
>> packets. With this reset, the FEC clears the previous setting of MII
>> transfer speed. This patch ensures, that it is set again to a reasonable
>> value after a FEC reset.
>
> Hmmm... what is the exact effect of the bug you are trying to fix
> here? Do you have any example how to trigger erroneous behaviour?
>
> Best regards,
>
> Wolfgang Denk
>
--
--------------------------------------------
Embedded Brains GmbH
Thomas Doerfler Obere Lagerstrasse 30
D-82178 Puchheim Germany
email: Thomas.Doerfler at embedded-brains.de
Phone: +49-89-18908079-2
Fax: +49-89-18908079-9
More information about the U-Boot
mailing list