]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
drivers/net/at91_emac.c: increase timeout for autonegotiation
authorAndreas Bießmann <andreas.devel@googlemail.com>
Thu, 7 Oct 2010 07:44:46 +0000 (09:44 +0200)
committerBen Warren <biggerbadderben@gmail.com>
Tue, 12 Oct 2010 06:00:28 +0000 (23:00 -0700)
This patch increases timeout for autonegotiation from 1 second to 3 seconds.
Some boards (e.g. at91rm9200ek) did not negotiate within 1 second.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
drivers/net/at91_emac.c

index d82459b1ce9c5aef4ce1913d787a2fd72b69a9cf..6e42bfe1d749a48fbffe11f505243f1250f507dc 100644 (file)
@@ -208,7 +208,7 @@ static int at91emac_phy_reset(struct eth_device *netdev)
        at91emac_write(emac, CONFIG_DRIVER_AT91EMAC_PHYADDR, MII_BMCR,
                (BMCR_ANENABLE | BMCR_ANRESTART));
 
-       for (i = 0; i < 100000 / 100; i++) {
+       for (i = 0; i < 30000; i++) {
                at91emac_read(emac, CONFIG_DRIVER_AT91EMAC_PHYADDR,
                        MII_BMSR, &status);
                if (status & BMSR_ANEGCOMPLETE)