Skip to content

Commit

Permalink
net: dsa: qca8k: enlarge mdio delay and timeout
Browse files Browse the repository at this point in the history
The witch require some extra delay after setting page or the next
read/write can use still use the old page. Add a delay after the
set_page function to address this as it's done in QSDK legacy driver.
Some timeouts were notice with VLAN and phy function, enlarge the
mdio busy wait timeout to fix these problems.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ansuel Smith authored and David S. Miller committed May 14, 2021
1 parent 60df02b commit 617960d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions drivers/net/dsa/qca8k.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ qca8k_set_page(struct mii_bus *bus, u16 page)
}

qca8k_current_page = page;
usleep_range(1000, 2000);
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/dsa/qca8k.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#define PHY_ID_QCA8337 0x004dd036
#define QCA8K_ID_QCA8337 0x13

#define QCA8K_BUSY_WAIT_TIMEOUT 20
#define QCA8K_BUSY_WAIT_TIMEOUT 2000

#define QCA8K_NUM_FDB_RECORDS 2048

Expand Down

0 comments on commit 617960d

Please sign in to comment.