diff options
Diffstat (limited to 'target/linux/ramips/patches-5.4/0401-net-ethernet-mediatek-significantly-reduce-mdio-bus-.patch')
-rw-r--r-- | target/linux/ramips/patches-5.4/0401-net-ethernet-mediatek-significantly-reduce-mdio-bus-.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/target/linux/ramips/patches-5.4/0401-net-ethernet-mediatek-significantly-reduce-mdio-bus-.patch b/target/linux/ramips/patches-5.4/0401-net-ethernet-mediatek-significantly-reduce-mdio-bus-.patch new file mode 100644 index 0000000000..c2ba9964e9 --- /dev/null +++ b/target/linux/ramips/patches-5.4/0401-net-ethernet-mediatek-significantly-reduce-mdio-bus-.patch @@ -0,0 +1,26 @@ +From: Felix Fietkau <nbd@nbd.name> +Date: Mon, 8 Jun 2020 17:02:39 +0200 +Subject: [PATCH] net: ethernet: mediatek: significantly reduce mdio bus + access latency + +usleep_range often ends up sleeping much longer than the 10-20us provided +as a range here. This causes significant latency in mdio bus acceses, +which easily adds multiple seconds to the boot time on MT7621 when polling +DSA slave ports. +Use cond_resched instead of usleep_range, since the MDIO access does not +take much time + +Signed-off-by: Felix Fietkau <nbd@nbd.name> +--- + +--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c ++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +@@ -85,7 +85,7 @@ static int mtk_mdio_busy_wait(struct mtk + return 0; + if (time_after(jiffies, t_start + PHY_IAC_TIMEOUT)) + break; +- usleep_range(10, 20); ++ cond_resched(); + } + + dev_err(eth->dev, "mdio: MDIO timeout\n"); |