[U-Boot] [PATCH] drivers/net/tsec.c - mii_parse_sr does not wait for auto-negotiation completion bug fix

Peter Tyser ptyser at xes-inc.com
Tue Mar 24 20:01:22 CET 2009


Hi Michael,

On Tue, 2009-03-24 at 19:57 +0200, Michael Zaidman wrote:
> drivers/net/tsec.c - mii_parse_sr does not wait for auto-negotiation
> completion bug fix
> 
> In the case when the MIIM_STATUS_LINK is 0 i.e. link is down
> and this is the situation immediately after power up,
> the code of awaiting for auto-negotiation completion now will be executed.
> 
> Signed-off-by: Michael Zaidman <michael.zaidman at gmail.com>
> ---
>  drivers/net/tsec.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c
> index 399116f..54279ca 100644
> --- a/drivers/net/tsec.c
> +++ b/drivers/net/tsec.c
> @@ -363,7 +363,7 @@ uint mii_parse_sr(uint mii_reg, struct tsec_private * priv)
>          * (ie - we're capable and it's not done)
>          */
>         mii_reg = read_phy_reg(priv, MIIM_STATUS);
> -       if ((mii_reg & MIIM_STATUS_LINK) && (mii_reg & PHY_BMSR_AUTN_ABLE)
> +       if (!(mii_reg & MIIM_STATUS_LINK) && (mii_reg & PHY_BMSR_AUTN_ABLE)
>             && !(mii_reg & PHY_BMSR_AUTN_COMP)) {
>                 int i = 0;

This issue has been brought up once before:
http://lists.denx.de/pipermail/u-boot/2009-February/046829.html

There was some concern about adding delay to the boot process in the
case that the primary ethernet port(s) did not achieve link.

There had also been some discussion about performing PHY
auto-negotiation in parallel, but this seems like a much larger can of
worms.

I had proposed this:
http://lists.denx.de/pipermail/u-boot/2009-February/048489.html

Andy/Ben, any feedback on getting a patch such as Michael's or mine
merged in?

Thanks,
Peter



More information about the U-Boot mailing list