aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/patches-5.4/202-ag71xx-Run-ag71xx_link_adjust-only-when-needed.patch
diff options
context:
space:
mode:
authorDavid Bauer <mail@david-bauer.net>2020-03-13 01:07:39 +0100
committerDavid Bauer <mail@david-bauer.net>2020-03-13 20:43:57 +0100
commit32726846c85985fbc320d123a7b26b32124cd47a (patch)
tree6c374c2f4825162ca58c65b2b1beba013ab2412b /target/linux/ath79/patches-5.4/202-ag71xx-Run-ag71xx_link_adjust-only-when-needed.patch
parent0933d1363b262017a815a538a0017f301f34883b (diff)
downloadupstream-32726846c85985fbc320d123a7b26b32124cd47a.tar.gz
upstream-32726846c85985fbc320d123a7b26b32124cd47a.tar.bz2
upstream-32726846c85985fbc320d123a7b26b32124cd47a.zip
ath79: use downstream ag71xx for Kernel 5.4
The ag71xx driver from Linux 5.4 currently has various shortcomings when used with OpenWrt compared to our downstream version. For example, the upstream driver does not support modifying the ethernet clock and configuring RGMII delays on the MAC side. While we should certainly switch to the upstream driver, the amount of necessary patches would make it cumbersome to work with. It's also highly likely we won't be able to finish patching the upstream driver in time for a Linux 5.4 release. Tested on Siemens WS-AP3610. CC: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: David Bauer <mail@david-bauer.net> Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'target/linux/ath79/patches-5.4/202-ag71xx-Run-ag71xx_link_adjust-only-when-needed.patch')
-rw-r--r--target/linux/ath79/patches-5.4/202-ag71xx-Run-ag71xx_link_adjust-only-when-needed.patch69
1 files changed, 0 insertions, 69 deletions
diff --git a/target/linux/ath79/patches-5.4/202-ag71xx-Run-ag71xx_link_adjust-only-when-needed.patch b/target/linux/ath79/patches-5.4/202-ag71xx-Run-ag71xx_link_adjust-only-when-needed.patch
deleted file mode 100644
index 00f34dffa1..0000000000
--- a/target/linux/ath79/patches-5.4/202-ag71xx-Run-ag71xx_link_adjust-only-when-needed.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From d42c6bf2752a46bdf3931bd6e56db419742fbb20 Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens <hauke@hauke-m.de>
-Date: Mon, 17 Feb 2020 23:55:22 +0100
-Subject: [PATCH 3/3] ag71xx: Run ag71xx_link_adjust() only when needed
-
-My system printed this line every second:
- ag71xx 19000000.eth eth0: Link is Up - 1Gbps/Full - flow control off
-The function ag71xx_phy_link_adjust() was called by the PHY layer every
-second even when nothing changed.
-
-With this patch the old status is stored and the real
-ag71xx_link_adjust() function is only called when when something really
-changed. This way the update and also this print is only done once any
-more.
-
-Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-Fixes: d51b6ce441d3 ("net: ethernet: add ag71xx driver")
----
- drivers/net/ethernet/atheros/ag71xx.c | 24 +++++++++++++++++++++++-
- 1 file changed, 23 insertions(+), 1 deletion(-)
-
---- a/drivers/net/ethernet/atheros/ag71xx.c
-+++ b/drivers/net/ethernet/atheros/ag71xx.c
-@@ -307,6 +307,10 @@ struct ag71xx {
- u32 msg_enable;
- const struct ag71xx_dcfg *dcfg;
-
-+ unsigned int link;
-+ unsigned int speed;
-+ int duplex;
-+
- /* From this point onwards we're not looking at per-packet fields. */
- void __iomem *mac_base;
-
-@@ -854,6 +858,7 @@ static void ag71xx_link_adjust(struct ag
-
- if (!phydev->link && update) {
- ag71xx_hw_stop(ag);
-+ phy_print_status(phydev);
- return;
- }
-
-@@ -907,8 +912,25 @@ static void ag71xx_link_adjust(struct ag
- static void ag71xx_phy_link_adjust(struct net_device *ndev)
- {
- struct ag71xx *ag = netdev_priv(ndev);
-+ struct phy_device *phydev = ndev->phydev;
-+ int status_change = 0;
-+
-+ if (phydev->link) {
-+ if (ag->duplex != phydev->duplex
-+ || ag->speed != phydev->speed) {
-+ status_change = 1;
-+ }
-+ }
-+
-+ if (phydev->link != ag->link)
-+ status_change = 1;
-+
-+ ag->link = phydev->link;
-+ ag->duplex = phydev->duplex;
-+ ag->speed = phydev->speed;
-
-- ag71xx_link_adjust(ag, true);
-+ if (status_change)
-+ ag71xx_link_adjust(ag, true);
- }
-
- static int ag71xx_phy_connect(struct ag71xx *ag)