* [PATCH net] net: phy: add workaround for issue where PHY driver doesn't bind to the device
@ 2018-11-23 18:41 Heiner Kallweit
2018-11-26 13:24 ` Andrew Lunn
2018-11-27 23:01 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Heiner Kallweit @ 2018-11-23 18:41 UTC (permalink / raw)
To: Andrew Lunn, Florian Fainelli, David Miller; +Cc: netdev@vger.kernel.org
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>
---
I'm not sure how long it will take to find and fix the root cause of
the issue. With this workaround affected users have a working network
again from 4.19.5 at least.
---
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 e06613f2d..0904002b1 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -2255,6 +2255,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.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH net] net: phy: add workaround for issue where PHY driver doesn't bind to the device
2018-11-23 18:41 [PATCH net] net: phy: add workaround for issue where PHY driver doesn't bind to the device Heiner Kallweit
@ 2018-11-26 13:24 ` Andrew Lunn
2018-11-27 23:01 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2018-11-26 13:24 UTC (permalink / raw)
To: Heiner Kallweit; +Cc: Florian Fainelli, David Miller, netdev@vger.kernel.org
On Fri, Nov 23, 2018 at 07:41:29PM +0100, Heiner Kallweit wrote:
> 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>
> ---
> I'm not sure how long it will take to find and fix the root cause of
> the issue. With this workaround affected users have a working network
> again from 4.19.5 at least.
Hi Heiner
Lets go with this for the moment. That gives us time to try to figure
out what is going on to cause the wrong driver to be used for the
r8169.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH net] net: phy: add workaround for issue where PHY driver doesn't bind to the device
2018-11-23 18:41 [PATCH net] net: phy: add workaround for issue where PHY driver doesn't bind to the device Heiner Kallweit
2018-11-26 13:24 ` Andrew Lunn
@ 2018-11-27 23:01 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2018-11-27 23:01 UTC (permalink / raw)
To: hkallweit1; +Cc: andrew, f.fainelli, netdev
From: Heiner Kallweit <hkallweit1@gmail.com>
Date: Fri, 23 Nov 2018 19:41:29 +0100
> 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>
Applied and queued up for -stable.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-11-28 10:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-23 18:41 [PATCH net] net: phy: add workaround for issue where PHY driver doesn't bind to the device Heiner Kallweit
2018-11-26 13:24 ` Andrew Lunn
2018-11-27 23:01 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).