From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH 7/7] tsec: fix link detection for the RTL8211B PHY
Date: Fri, 14 Mar 2008 23:20:30 +0300 [thread overview]
Message-ID: <20080314202030.GG22581@localhost.localdomain> (raw)
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
next reply other threads:[~2008-03-14 20:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-14 20:20 Anton Vorontsov [this message]
2008-03-26 0:26 ` [U-Boot-Users] [PATCH 7/7] tsec: fix link detection for the RTL8211B PHY Kim Phillips
2008-03-26 3:11 ` Ben Warren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080314202030.GG22581@localhost.localdomain \
--to=avorontsov@ru.mvista.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox