Skip to content

Commit

Permalink
cpmac: wait longer after MDIO reset
Browse files Browse the repository at this point in the history
This patch slows down the MDIO_ALIVE busy waiting to let
switches and PHY come up after reset. Previous loop was
too quick for IC+175C and ADM6996C/L switches to come up.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Florian Fainelli authored and David S. Miller committed Aug 5, 2009
1 parent 76e61ea commit e4540aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/cpmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1245,11 +1245,11 @@ int __devinit cpmac_init(void)

cpmac_mii->reset(cpmac_mii);

for (i = 0; i < 300000; i++)
for (i = 0; i < 300; i++)
if ((mask = cpmac_read(cpmac_mii->priv, CPMAC_MDIO_ALIVE)))
break;
else
cpu_relax();
msleep(10);

mask &= 0x7fffffff;
if (mask & (mask - 1)) {
Expand Down

0 comments on commit e4540aa

Please sign in to comment.