Skip to content

Commit 38af4b9

Browse files
hkallweitgregkh
authored andcommitted
net: phy: add workaround for issue where PHY driver doesn't bind to the device
[ Upstream commit c85ddec ] 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: f1e911d ("r8169: add basic phylib support") Signed-off-by: Heiner Kallweit <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent aaa7e45 commit 38af4b9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/net/phy/phy_device.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1930,6 +1930,14 @@ int phy_driver_register(struct phy_driver *new_driver, struct module *owner)
19301930
new_driver->mdiodrv.driver.remove = phy_remove;
19311931
new_driver->mdiodrv.driver.owner = owner;
19321932

1933+
/* The following works around an issue where the PHY driver doesn't bind
1934+
* to the device, resulting in the genphy driver being used instead of
1935+
* the dedicated driver. The root cause of the issue isn't known yet
1936+
* and seems to be in the base driver core. Once this is fixed we may
1937+
* remove this workaround.
1938+
*/
1939+
new_driver->mdiodrv.driver.probe_type = PROBE_FORCE_SYNCHRONOUS;
1940+
19331941
retval = driver_register(&new_driver->mdiodrv.driver);
19341942
if (retval) {
19351943
pr_err("%s: Error %d in registering driver\n",

0 commit comments

Comments
 (0)