diff options
author | John Crispin <john@phrozen.org> | 2017-09-07 10:11:45 +0200 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2017-09-07 10:11:45 +0200 |
commit | 23317f18bd485e821ca494a61dc09044b1d0e371 (patch) | |
tree | a73c20bed447081637ef7c9f89cd048656569729 /target/linux/mediatek | |
parent | 9a753c49ea7053f3592f9ec1ce9d97882edb332d (diff) | |
download | upstream-23317f18bd485e821ca494a61dc09044b1d0e371.tar.gz upstream-23317f18bd485e821ca494a61dc09044b1d0e371.tar.bz2 upstream-23317f18bd485e821ca494a61dc09044b1d0e371.zip |
mediatek: fix mdio schedule while atomic error
Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'target/linux/mediatek')
-rw-r--r-- | target/linux/mediatek/patches-4.9/0062-mdio-atomic.patch | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/target/linux/mediatek/patches-4.9/0062-mdio-atomic.patch b/target/linux/mediatek/patches-4.9/0062-mdio-atomic.patch new file mode 100644 index 0000000000..040084d781 --- /dev/null +++ b/target/linux/mediatek/patches-4.9/0062-mdio-atomic.patch @@ -0,0 +1,16 @@ +Index: linux-4.9.47/drivers/net/ethernet/mediatek/mtk_eth_soc.c +=================================================================== +--- linux-4.9.47.orig/drivers/net/ethernet/mediatek/mtk_eth_soc.c ++++ linux-4.9.47/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"); |