Commit e4540aa9 authored by Florian Fainelli's avatar Florian Fainelli Committed by David S. Miller

cpmac: wait longer after MDIO reset

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: default avatarFlorian Fainelli <florian@openwrt.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 76e61eaa
...@@ -1245,11 +1245,11 @@ int __devinit cpmac_init(void) ...@@ -1245,11 +1245,11 @@ int __devinit cpmac_init(void)
cpmac_mii->reset(cpmac_mii); 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))) if ((mask = cpmac_read(cpmac_mii->priv, CPMAC_MDIO_ALIVE)))
break; break;
else else
cpu_relax(); msleep(10);
mask &= 0x7fffffff; mask &= 0x7fffffff;
if (mask & (mask - 1)) { if (mask & (mask - 1)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment