2017-09-10 21:37:48 +00:00
|
|
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
|
|
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
2017-09-07 08:11:45 +00:00
|
|
|
@@ -97,7 +97,10 @@ static int mtk_mdio_busy_wait(struct mtk
|
|
|
|
return 0;
|
|
|
|
if (time_after(jiffies, t_start + PHY_IAC_TIMEOUT))
|
|
|
|
break;
|
|
|
|
- usleep_range(10, 20);
|
|
|
|
+ if (in_atomic())
|
|
|
|
+ udelay(10);
|
|
|
|
+ else
|
|
|
|
+ usleep_range(10, 20);
|
|
|
|
}
|
|
|
|
|
|
|
|
dev_err(eth->dev, "mdio: MDIO timeout\n");
|