diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2020-02-18 00:36:28 +0100 |
---|---|---|
committer | Koen Vandeputte <koen.vandeputte@ncentric.com> | 2020-02-28 17:50:46 +0100 |
commit | 1e95f9b3ea8375931bf82b8d102b9410d6eafcfa (patch) | |
tree | 41f419aadf177b18011f3f76cca4acc013130799 /target/linux/ath79/patches-5.4/201-ag71xx-Call-ag71xx_hw_disable-in-case-phy_conenct-fa.patch | |
parent | 53ab9865c2b91bc6a239b2adee800dc52875b6bc (diff) | |
download | upstream-1e95f9b3ea8375931bf82b8d102b9410d6eafcfa.tar.gz upstream-1e95f9b3ea8375931bf82b8d102b9410d6eafcfa.tar.bz2 upstream-1e95f9b3ea8375931bf82b8d102b9410d6eafcfa.zip |
ath79: Make upstream ag71xx driver work
* Fix some bugs in the driver
* Add missing clock and reset references in dts
* Rename mdio-bus to mdio so the driver find it
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'target/linux/ath79/patches-5.4/201-ag71xx-Call-ag71xx_hw_disable-in-case-phy_conenct-fa.patch')
-rw-r--r-- | target/linux/ath79/patches-5.4/201-ag71xx-Call-ag71xx_hw_disable-in-case-phy_conenct-fa.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/target/linux/ath79/patches-5.4/201-ag71xx-Call-ag71xx_hw_disable-in-case-phy_conenct-fa.patch b/target/linux/ath79/patches-5.4/201-ag71xx-Call-ag71xx_hw_disable-in-case-phy_conenct-fa.patch new file mode 100644 index 0000000000..16d60a4e0c --- /dev/null +++ b/target/linux/ath79/patches-5.4/201-ag71xx-Call-ag71xx_hw_disable-in-case-phy_conenct-fa.patch @@ -0,0 +1,45 @@ +From 2f8c5a68d0030ae5e65fca1bf5ca44929d5b3b06 Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens <hauke@hauke-m.de> +Date: Mon, 17 Feb 2020 23:50:23 +0100 +Subject: [PATCH 2/3] ag71xx: Call ag71xx_hw_disable() in case phy_conenct + fails + +When the ag71xx_phy_connect() failed only parts of the actions done +previously in this function wrere reverted, because only +ag71xx_rings_cleanup() was called. My system crashed the next time +open() was called because napi_disable() was not called again and this +resulted in two calls to napi_enable(), which is not allowed. + +Fix this by disabling the device again. + +Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> +Fixes: d51b6ce441d3 ("net: ethernet: add ag71xx driver") +--- + drivers/net/ethernet/atheros/ag71xx.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/drivers/net/ethernet/atheros/ag71xx.c ++++ b/drivers/net/ethernet/atheros/ag71xx.c +@@ -1263,18 +1263,18 @@ static int ag71xx_open(struct net_device + + ret = ag71xx_hw_enable(ag); + if (ret) +- goto err; ++ return ret; + + ret = ag71xx_phy_connect(ag); + if (ret) +- goto err; ++ goto err_hw_disable; + + phy_start(ndev->phydev); + + return 0; + +-err: +- ag71xx_rings_cleanup(ag); ++err_hw_disable: ++ ag71xx_hw_disable(ag); + return ret; + } + |