[PATCH] net: miidev: really wait for auto negotiation
Wolfram Sang
w.sang at pengutronix.de
Fri Aug 31 12:00:37 EDT 2012
miidev_wait_aneg() polled the wrong bit, so link detection did fail on
boards where the PHY had to come out of a powerdown mode.
Signed-off-by: Wolfram Sang <w.sang at pengutronix.de>
---
drivers/net/miidev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/miidev.c b/drivers/net/miidev.c
index b49944b..75b53e3 100644
--- a/drivers/net/miidev.c
+++ b/drivers/net/miidev.c
@@ -116,7 +116,7 @@ int miidev_wait_aneg(struct mii_device *mdev)
return -ETIMEDOUT;
}
- } while (!(status & BMSR_LSTATUS));
+ } while (!(status & BMSR_ANEGCOMPLETE));
return 0;
}
--
1.7.10.4
More information about the barebox
mailing list