* [U-Boot-Users] tsec ethernet link bug?
@ 2006-08-08 22:54 sagarwal
0 siblings, 0 replies; only message in thread
From: sagarwal @ 2006-08-08 22:54 UTC (permalink / raw)
To: u-boot
Hi
I'm using a 8548CDS board and I have a link plugged
into eth1 (but not eth0). When I run u-boot, it thinks
that eth0 is plugged in and keeps trying tftp on that
port.
I think there is a little bug in the code - here is a
diff. Basically priv->link inadvertently gets set to
1 when the timeout case breaks out of the
while loop inside the routine mii_parse_sr().
Could somebody please confirm if they have seen
this?
thanks.
===============================================================
diff --git a/drivers/tsec.c b/drivers/tsec.c
index f860dae..06c25bc 100644
--- a/drivers/tsec.c
+++ b/drivers/tsec.c
@@ -363,7 +363,7 @@ uint mii_parse_sr(uint mii_reg, struct t
if (i > PHY_AUTONEGOTIATE_TIMEOUT) {
puts (" TIMEOUT !\n");
priv->link = 0;
- break;
+ return 0;
}
if ((i++ % 1000) == 0) {
================================================================
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2006-08-08 22:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-08 22:54 [U-Boot-Users] tsec ethernet link bug? sagarwal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox