aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath25/patches-4.9/220-enet_micrel_workaround.patch
diff options
context:
space:
mode:
authorSergey Ryazanov <ryazanov.s.a@gmail.com>2017-06-07 01:49:38 +0300
committerJohn Crispin <john@phrozen.org>2017-06-07 06:47:03 +0200
commit3e3d482c98024aadd94200acfdf811c43b5cd7c4 (patch)
tree14e40dae11a127f6e470b8ac3f60ad7f8238549b /target/linux/ath25/patches-4.9/220-enet_micrel_workaround.patch
parentb1cc215d276855a0ec910e953e6b49cfe0721719 (diff)
downloadupstream-3e3d482c98024aadd94200acfdf811c43b5cd7c4.tar.gz
upstream-3e3d482c98024aadd94200acfdf811c43b5cd7c4.tar.bz2
upstream-3e3d482c98024aadd94200acfdf811c43b5cd7c4.zip
ath25: 4.9: fix Ethernet link autonegotiation
Drop the own PHY polling function and switch to using the kernel PHY state machine. This change allows driver to work correctly with devices that do not support PHY behaviour but whose driver could emulate autonegotiation completion (e.g. MV88E6060 and IP17xx switches). NB: earlier this driver rely on flaws in PHY core code and could use PHY device without really starting it. But now (at least in kernel 4.9) this trick no more work and network interface could stuck in not-running state. Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Diffstat (limited to 'target/linux/ath25/patches-4.9/220-enet_micrel_workaround.patch')
-rw-r--r--target/linux/ath25/patches-4.9/220-enet_micrel_workaround.patch24
1 files changed, 22 insertions, 2 deletions
diff --git a/target/linux/ath25/patches-4.9/220-enet_micrel_workaround.patch b/target/linux/ath25/patches-4.9/220-enet_micrel_workaround.patch
index 398495a80c..91b9792515 100644
--- a/target/linux/ath25/patches-4.9/220-enet_micrel_workaround.patch
+++ b/target/linux/ath25/patches-4.9/220-enet_micrel_workaround.patch
@@ -66,7 +66,7 @@
if (ar231x_mdiobus_probe(dev) != 0) {
printk(KERN_ERR "%s: mdiobus_probe failed\n", dev->name);
rx_tasklet_cleanup(dev);
-@@ -329,8 +374,10 @@ static int ar231x_remove(struct platform
+@@ -326,8 +371,10 @@ static int ar231x_remove(struct platform
rx_tasklet_cleanup(dev);
ar231x_init_cleanup(dev);
unregister_netdev(dev);
@@ -79,7 +79,27 @@
kfree(dev);
return 0;
}
-@@ -1079,6 +1126,9 @@ static int ar231x_ioctl(struct net_devic
+@@ -870,7 +917,8 @@ static int ar231x_open(struct net_device
+
+ sp->eth_regs->mac_control |= MAC_CONTROL_RE;
+
+- phy_start(sp->phy_dev);
++ if (sp->phy_dev)
++ phy_start(sp->phy_dev);
+
+ return 0;
+ }
+@@ -951,7 +999,8 @@ static int ar231x_close(struct net_devic
+
+ #endif
+
+- phy_stop(sp->phy_dev);
++ if (sp->phy_dev)
++ phy_stop(sp->phy_dev);
+
+ return 0;
+ }
+@@ -995,6 +1044,9 @@ static int ar231x_ioctl(struct net_devic
{
struct ar231x_private *sp = netdev_priv(dev);