net: phy: Do not perform software reset for Generic PHY
Subsystems (3)
PATCH 1/1 net: phy: Do not perform software reset for Generic PHY
The Generic PHY driver is a catch-all PHY driver and it should preserve whatever prior initialization has been done by boot loader or firmware agents. For specific PHY device configuration it is expected that a specialized PHY driver would take over that role.
Resetting the generic PHY was a bad idea that has lead to several complaints and downstream workarounds e.g: in OpenWrt/LEDE so restore the behavior prior to 87aa9f9c61ad ("net: phy: consolidate PHY reset in phy_init_hw()").
--- drivers/net/phy/phy_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/phy/phy_device.c +1 -1
@@ -1864,7 +1864,7 @@ static struct phy_driver genphy_driver[] = { .phy_id = 0xffffffff, .phy_id_mask = 0xffffffff, .name = "Generic PHY", - .soft_reset = genphy_soft_reset, + .soft_reset = genphy_no_soft_reset, .config_init = genphy_config_init, .features =PHY_GBIT_FEATURES |SUPPORTED_MII | SUPPORTED_AUI | SUPPORTED_FIBRE |
Signature · 1 line
2.9.3
Quoted 5 lines · Florian Fainelli
The Generic PHY driver is a catch-all PHY driver and it should preserve whatever prior initialization has been done by boot loader or firmware agents. For specific PHY device configuration it is expected that a specialized PHY driver would take over that role.
Quoted 8 lines
Resetting the generic PHY was a bad idea that has lead to several complaints and downstream workarounds e.g: in OpenWrt/LEDE so restore the behavior prior to
87aa9f9c61ad("net: phy: consolidate PHY reset inphy_init_hw()").Reported-by Felix Fietkau <[email protected]>Fixes 87aa9f9c61ad ("net: phy: consolidate PHY reset in phy_init_hw()")Signed-off-by Florian Fainelli <[email protected]>
And I forgot to include include/linux/phy.h in the patch so it won't build, v2 coming.
Quoted 18 lines
--- drivers/net/phy/phy_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/phy/phy_device.c +1
-1@@ -1864,7 +1864,7 @@ static struct phy_driver genphy_driver[] = { .phy_id = 0xffffffff, .phy_id_mask = 0xffffffff, .name = "Generic PHY", - .soft_reset = genphy_soft_reset, + .soft_reset = genphy_no_soft_reset, .config_init = genphy_config_init, .features =PHY_GBIT_FEATURES |SUPPORTED_MII | SUPPORTED_AUI | SUPPORTED_FIBRE |
Signature · 1 line
Florian