From e63ac4cf11b8c4a86c692b9c22c49402228a22c4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andreas=20Bie=C3=9Fmann?= Date: Thu, 7 Oct 2010 09:44:46 +0200 Subject: [PATCH] drivers/net/at91_emac.c: increase timeout for autonegotiation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Ben Warren --- drivers/net/at91_emac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/at91_emac.c b/drivers/net/at91_emac.c index d82459b1ce..6e42bfe1d7 100644 --- a/drivers/net/at91_emac.c +++ b/drivers/net/at91_emac.c @@ -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) -- 2.30.2