public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH 7/7] tsec: fix link detection for the RTL8211B PHY
@ 2008-03-14 20:20 Anton Vorontsov
  2008-03-26  0:26 ` Kim Phillips
  0 siblings, 1 reply; 3+ messages in thread
From: Anton Vorontsov @ 2008-03-14 20:20 UTC (permalink / raw)
  To: u-boot

RTL8211B sets link state register after autonegotiation complete,
so with bootdelay=0 RTL8211B will report lack of the link.

To fix this, we should wait for aneg to complete, even if the
link is currently down.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
 drivers/net/tsec.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c
index e91d9ea..431a8d2 100644
--- a/drivers/net/tsec.c
+++ b/drivers/net/tsec.c
@@ -583,10 +583,11 @@ uint mii_parse_RTL8211B_sr(uint mii_reg, struct tsec_private * priv)
 	uint speed;
 
 	mii_reg = read_phy_reg(priv, MIIM_RTL8211B_PHY_STATUS);
-	if ((mii_reg & MIIM_RTL8211B_PHYSTAT_LINK) &&
-		!(mii_reg & MIIM_RTL8211B_PHYSTAT_SPDDONE)) {
+	if (!(mii_reg & MIIM_RTL8211B_PHYSTAT_SPDDONE)) {
 		int i = 0;
 
+		/* in case of timeout ->link is cleared */
+		priv->link = 1;
 		puts("Waiting for PHY realtime link");
 		while (!(mii_reg & MIIM_RTL8211B_PHYSTAT_SPDDONE)) {
 			/* Timeout reached ? */
-- 
1.5.2.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot-Users] [PATCH 7/7] tsec: fix link detection for the RTL8211B PHY
  2008-03-14 20:20 [U-Boot-Users] [PATCH 7/7] tsec: fix link detection for the RTL8211B PHY Anton Vorontsov
@ 2008-03-26  0:26 ` Kim Phillips
  2008-03-26  3:11   ` Ben Warren
  0 siblings, 1 reply; 3+ messages in thread
From: Kim Phillips @ 2008-03-26  0:26 UTC (permalink / raw)
  To: u-boot

On Fri, 14 Mar 2008 23:20:30 +0300
Anton Vorontsov <avorontsov@ru.mvista.com> wrote:

> RTL8211B sets link state register after autonegotiation complete,
> so with bootdelay=0 RTL8211B will report lack of the link.
> 
> To fix this, we should wait for aneg to complete, even if the
> link is currently down.
> 
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
> ---
>  drivers/net/tsec.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)

applied.

Ben: Anton sent this to me and I didn't see you comment; let me know if
I'm impeding on your space here; or e.g. whether you'd rather I wait
for your ack.

Kim

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot-Users] [PATCH 7/7] tsec: fix link detection for the RTL8211B PHY
  2008-03-26  0:26 ` Kim Phillips
@ 2008-03-26  3:11   ` Ben Warren
  0 siblings, 0 replies; 3+ messages in thread
From: Ben Warren @ 2008-03-26  3:11 UTC (permalink / raw)
  To: u-boot

On Tue, Mar 25, 2008 at 8:26 PM, Kim Phillips
<kim.phillips@freescale.com> wrote:
> On Fri, 14 Mar 2008 23:20:30 +0300
>  Anton Vorontsov <avorontsov@ru.mvista.com> wrote:
>
>  > RTL8211B sets link state register after autonegotiation complete,
>  > so with bootdelay=0 RTL8211B will report lack of the link.
>  >
>  > To fix this, we should wait for aneg to complete, even if the
>  > link is currently down.
>  >
>  > Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
>  > ---
>  >  drivers/net/tsec.c |    5 +++--
>  >  1 files changed, 3 insertions(+), 2 deletions(-)
>
>  applied.
>
>  Ben: Anton sent this to me and I didn't see you comment; let me know if
>  I'm impeding on your space here; or e.g. whether you'd rather I wait
>  for your ack.
>

I'm not territorially inclined, so please pick it up.  This looks
harmless enough and is confined to code for a single PHY.

thanks,
Ben

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-03-26  3:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-14 20:20 [U-Boot-Users] [PATCH 7/7] tsec: fix link detection for the RTL8211B PHY Anton Vorontsov
2008-03-26  0:26 ` Kim Phillips
2008-03-26  3:11   ` Ben Warren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox