openwrtv4/target/linux/mediatek/patches-4.14/0062-mdio-atomic.patch
John Crispin 7762c07c88 mediatek: bump to v4.14
This drops support for all the !emmc EVB and adds banannaPi-R2
Also drop mtkhnat until the nftables offoad driver is ready

Signed-off-by: John Crispin <john@phrozen.org>
2018-02-14 11:27:50 +01:00

14 lines
386 B
Diff

--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -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");