aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek/patches-4.14/0063-atomic-sleep.patch
diff options
context:
space:
mode:
authorJohn Crispin <john@phrozen.org>2018-01-08 15:06:24 +0100
committerJohn Crispin <john@phrozen.org>2018-02-14 11:27:50 +0100
commit7762c07c88980cff85ec20c12f18cd172260e9d9 (patch)
treed5e9e1f28c1aa9b47eadcf6b8d063b394a34ed17 /target/linux/mediatek/patches-4.14/0063-atomic-sleep.patch
parent04d3308b6248ef21a6f0bc3378b342906c2d2865 (diff)
downloadupstream-7762c07c88980cff85ec20c12f18cd172260e9d9.tar.gz
upstream-7762c07c88980cff85ec20c12f18cd172260e9d9.tar.bz2
upstream-7762c07c88980cff85ec20c12f18cd172260e9d9.zip
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>
Diffstat (limited to 'target/linux/mediatek/patches-4.14/0063-atomic-sleep.patch')
-rw-r--r--target/linux/mediatek/patches-4.14/0063-atomic-sleep.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/target/linux/mediatek/patches-4.14/0063-atomic-sleep.patch b/target/linux/mediatek/patches-4.14/0063-atomic-sleep.patch
new file mode 100644
index 0000000000..de49dacd5f
--- /dev/null
+++ b/target/linux/mediatek/patches-4.14/0063-atomic-sleep.patch
@@ -0,0 +1,48 @@
+Index: linux-4.14.12/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+===================================================================
+--- linux-4.14.12.orig/drivers/net/ethernet/mediatek/mtk_eth_soc.c
++++ linux-4.14.12/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+@@ -409,6 +409,7 @@ static int mtk_mdio_init(struct mtk_eth
+
+ snprintf(eth->mii_bus->id, MII_BUS_ID_SIZE, "%s", mii_np->name);
+ ret = of_mdiobus_register(eth->mii_bus, mii_np);
++printk("%s:%s[%d]%d %p\n", __FILE__, __func__, __LINE__, ret, eth->mii_bus);
+
+ err_put_node:
+ of_node_put(mii_np);
+@@ -1472,7 +1473,10 @@ static void mtk_hwlro_rx_uninit(struct m
+ for (i = 0; i < 10; i++) {
+ val = mtk_r32(eth, MTK_PDMA_LRO_CTRL_DW0);
+ if (val & MTK_LRO_RING_RELINQUISH_DONE) {
+- msleep(20);
++ if (in_atomic())
++ mdelay(20);
++ else
++ msleep(20);
+ continue;
+ }
+ break;
+@@ -1868,7 +1872,10 @@ static void mtk_stop_dma(struct mtk_eth
+ for (i = 0; i < 10; i++) {
+ val = mtk_r32(eth, glo_cfg);
+ if (val & (MTK_TX_DMA_BUSY | MTK_RX_DMA_BUSY)) {
+- msleep(20);
++ if (in_atomic())
++ mdelay(20);
++ else
++ msleep(20);
+ continue;
+ }
+ break;
+@@ -1906,7 +1913,10 @@ static void ethsys_reset(struct mtk_eth
+ reset_bits,
+ reset_bits);
+
+- usleep_range(1000, 1100);
++ if (in_atomic())
++ udelay(1000);
++ else
++ usleep_range(1000, 1100);
+ regmap_update_bits(eth->ethsys, ETHSYS_RSTCTRL,
+ reset_bits,
+ ~reset_bits);