aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/patches-5.4/0034-NET-multi-phy-support.patch
diff options
context:
space:
mode:
authorDENG Qingfang <dengqf6@mail2.sysu.edu.cn>2020-03-01 17:01:09 +0800
committerChuanhong Guo <gch981213@gmail.com>2020-04-04 12:04:13 +0800
commitc70545f397187b36c1220ae16b4db19f39857c93 (patch)
tree752dc048ea32cf02d8cba30fc54d024ed58ce812 /target/linux/ramips/patches-5.4/0034-NET-multi-phy-support.patch
parentb51ea43f900191bc8ce7411dad39239fac6df4f8 (diff)
downloadupstream-c70545f397187b36c1220ae16b4db19f39857c93.tar.gz
upstream-c70545f397187b36c1220ae16b4db19f39857c93.tar.bz2
upstream-c70545f397187b36c1220ae16b4db19f39857c93.zip
ramips: copy patches and kernel config to 5.4
Copy patches and kernel config to 5.4 for ramips Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
Diffstat (limited to 'target/linux/ramips/patches-5.4/0034-NET-multi-phy-support.patch')
-rw-r--r--target/linux/ramips/patches-5.4/0034-NET-multi-phy-support.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/target/linux/ramips/patches-5.4/0034-NET-multi-phy-support.patch b/target/linux/ramips/patches-5.4/0034-NET-multi-phy-support.patch
new file mode 100644
index 0000000000..5536e3f61c
--- /dev/null
+++ b/target/linux/ramips/patches-5.4/0034-NET-multi-phy-support.patch
@@ -0,0 +1,59 @@
+From 0b6eb1e68290243d439ee330ea8d0b239a5aec69 Mon Sep 17 00:00:00 2001
+From: John Crispin <blogic@openwrt.org>
+Date: Sun, 27 Jul 2014 09:38:50 +0100
+Subject: [PATCH 34/53] NET: multi phy support
+
+Signed-off-by: John Crispin <blogic@openwrt.org>
+---
+ drivers/net/phy/phy.c | 9 ++++++---
+ include/linux/phy.h | 1 +
+ 2 files changed, 7 insertions(+), 3 deletions(-)
+
+--- a/drivers/net/phy/phy.c
++++ b/drivers/net/phy/phy.c
+@@ -913,7 +913,10 @@ void phy_state_machine(struct work_struc
+ /* If the link is down, give up on negotiation for now */
+ if (!phydev->link) {
+ phydev->state = PHY_NOLINK;
+- phy_link_down(phydev, true);
++ if (!phydev->no_auto_carrier_off)
++ phy_link_down(phydev, true);
++ else
++ phy_link_down(phydev, false);
+ break;
+ }
+
+@@ -1000,7 +1003,10 @@ void phy_state_machine(struct work_struc
+ phy_link_up(phydev);
+ } else {
+ phydev->state = PHY_NOLINK;
+- phy_link_down(phydev, true);
++ if (!phydev->no_auto_carrier_off)
++ phy_link_down(phydev, true);
++ else
++ phy_link_down(phydev, false);
+ }
+
+ if (phy_interrupt_is_valid(phydev))
+@@ -1010,7 +1016,10 @@ void phy_state_machine(struct work_struc
+ case PHY_HALTED:
+ if (phydev->link) {
+ phydev->link = 0;
+- phy_link_down(phydev, true);
++ if (!phydev->no_auto_carrier_off)
++ phy_link_down(phydev, true);
++ else
++ phy_link_down(phydev, false);
+ do_suspend = true;
+ }
+ break;
+--- a/include/linux/phy.h
++++ b/include/linux/phy.h
+@@ -412,6 +412,7 @@ struct phy_device {
+ bool suspended;
+ bool sysfs_links;
+ bool loopback_enabled;
++ bool no_auto_carrier_off;
+
+ enum phy_state state;
+