summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Cline <jcline@redhat.com>2018-11-29 17:05:58 -0500
committerJeremy Cline <jcline@redhat.com>2018-11-29 17:08:22 -0500
commit56e41c8eadca1cff1bcc51d9a40937eed8aa9f1f (patch)
tree744172ec78df66ef06c04732f957ca3cc71d6040
parent3121da6e92df893b8e3b6c894829c2bcc6018cfc (diff)
downloadkernel-56e41c8eadca1cff1bcc51d9a40937eed8aa9f1f.tar.gz
kernel-56e41c8eadca1cff1bcc51d9a40937eed8aa9f1f.tar.xz
kernel-56e41c8eadca1cff1bcc51d9a40937eed8aa9f1f.zip
Fix a problem with some rtl8168 chips (rhbz 1650984)
-rw-r--r--kernel.spec6
-rw-r--r--net-phy-add-workaround-for-issue-where-PHY-driver-do.patch53
2 files changed, 59 insertions, 0 deletions
diff --git a/kernel.spec b/kernel.spec
index 8153466f1..397cdc335 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -633,6 +633,9 @@ Patch512: mm-cleancache-fix-corruption-on-missed-inode-invalidation.patch
# CVE-2018-19407 (rhbz 1652656 1652658)
Patch513: CVE-2018-19407.patch
+# rhbz 1650984, in linux-next and Cc'd for stable
+Patch514: net-phy-add-workaround-for-issue-where-PHY-driver-do.patch
+
# END OF PATCH DEFINITIONS
%endif
@@ -1884,6 +1887,9 @@ fi
#
#
%changelog
+* Thu Nov 29 2018 Jeremy Cline <jeremy@jcline.org>
+- Fix a problem with some rtl8168 chips (rhbz 1650984)
+
* Tue Nov 27 2018 Jeremy Cline <jcline@redhat.com> - 4.19.5-300
- Linux v4.19.5
- Fix CVE-2018-16862 (rhbz 1649017 1653122)
diff --git a/net-phy-add-workaround-for-issue-where-PHY-driver-do.patch b/net-phy-add-workaround-for-issue-where-PHY-driver-do.patch
new file mode 100644
index 000000000..13c3de01f
--- /dev/null
+++ b/net-phy-add-workaround-for-issue-where-PHY-driver-do.patch
@@ -0,0 +1,53 @@
+From c85ddecae6e5e82ca3ae6f20c63f1d865e2ff5ea Mon Sep 17 00:00:00 2001
+From: Heiner Kallweit <hkallweit1@gmail.com>
+Date: Fri, 23 Nov 2018 19:41:29 +0100
+Subject: [PATCH] net: phy: add workaround for issue where PHY driver doesn't
+ bind to the device
+
+After switching the r8169 driver to use phylib some user reported that
+their network is broken. This was caused by the genphy PHY driver being
+used instead of the dedicated PHY driver for the RTL8211B. Users
+reported that loading the Realtek PHY driver module upfront fixes the
+issue. See also this mail thread:
+https://marc.info/?t=154279781800003&r=1&w=2
+The issue is quite weird and the root cause seems to be somewhere in
+the base driver core. The patch works around the issue and may be
+removed once the actual issue is fixed.
+
+The Fixes tag refers to the first reported occurrence of the issue.
+The issue itself may have been existing much longer and it may affect
+users of other network chips as well. Users typically will recognize
+this issue only if their PHY stops working when being used with the
+genphy driver.
+
+Fixes: f1e911d5d0df ("r8169: add basic phylib support")
+Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
+Reviewed-by: Andrew Lunn <andrew@lunn.ch>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Jeremy Cline <jcline@redhat.com>
+---
+ drivers/net/phy/phy_device.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
+index ab33d1777132..23ee3967c166 100644
+--- a/drivers/net/phy/phy_device.c
++++ b/drivers/net/phy/phy_device.c
+@@ -2197,6 +2197,14 @@ int phy_driver_register(struct phy_driver *new_driver, struct module *owner)
+ new_driver->mdiodrv.driver.remove = phy_remove;
+ new_driver->mdiodrv.driver.owner = owner;
+
++ /* The following works around an issue where the PHY driver doesn't bind
++ * to the device, resulting in the genphy driver being used instead of
++ * the dedicated driver. The root cause of the issue isn't known yet
++ * and seems to be in the base driver core. Once this is fixed we may
++ * remove this workaround.
++ */
++ new_driver->mdiodrv.driver.probe_type = PROBE_FORCE_SYNCHRONOUS;
++
+ retval = driver_register(&new_driver->mdiodrv.driver);
+ if (retval) {
+ pr_err("%s: Error %d in registering driver\n",
+--
+2.19.2
+