kernel: bump 5.10 to 5.10.117
[openwrt/openwrt.git] / target / linux / generic / backport-5.10 / 735-v5.14-19-net-dsa-qca8k-enlarge-mdio-delay-and-timeout.patch
1 From 617960d72e93de0f3fa52407e2d39e8c43e73b0a Mon Sep 17 00:00:00 2001
2 From: Ansuel Smith <ansuelsmth@gmail.com>
3 Date: Fri, 14 May 2021 23:00:09 +0200
4 Subject: [PATCH] net: dsa: qca8k: enlarge mdio delay and timeout
5
6 The witch require some extra delay after setting page or the next
7 read/write can use still use the old page. Add a delay after the
8 set_page function to address this as it's done in QSDK legacy driver.
9 Some timeouts were notice with VLAN and phy function, enlarge the
10 mdio busy wait timeout to fix these problems.
11
12 Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
13 Signed-off-by: David S. Miller <davem@davemloft.net>
14 ---
15 drivers/net/dsa/qca8k.c | 1 +
16 drivers/net/dsa/qca8k.h | 2 +-
17 2 files changed, 2 insertions(+), 1 deletion(-)
18
19 --- a/drivers/net/dsa/qca8k.c
20 +++ b/drivers/net/dsa/qca8k.c
21 @@ -143,6 +143,7 @@ qca8k_set_page(struct mii_bus *bus, u16
22 }
23
24 qca8k_current_page = page;
25 + usleep_range(1000, 2000);
26 return 0;
27 }
28
29 --- a/drivers/net/dsa/qca8k.h
30 +++ b/drivers/net/dsa/qca8k.h
31 @@ -20,7 +20,7 @@
32 #define PHY_ID_QCA8337 0x004dd036
33 #define QCA8K_ID_QCA8337 0x13
34
35 -#define QCA8K_BUSY_WAIT_TIMEOUT 20
36 +#define QCA8K_BUSY_WAIT_TIMEOUT 2000
37
38 #define QCA8K_NUM_FDB_RECORDS 2048
39