Commit 0878fff1 authored by Florian Fainelli's avatar Florian Fainelli Committed by David S. Miller

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 87aa9f9c ("net: phy: consolidate PHY
reset in phy_init_hw()").
Reported-by: default avatarFelix Fietkau <nbd@nbd.name>
Fixes: 87aa9f9c ("net: phy: consolidate PHY reset in phy_init_hw()")
Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f38837b0
...@@ -1864,7 +1864,7 @@ static struct phy_driver genphy_driver[] = { ...@@ -1864,7 +1864,7 @@ static struct phy_driver genphy_driver[] = {
.phy_id = 0xffffffff, .phy_id = 0xffffffff,
.phy_id_mask = 0xffffffff, .phy_id_mask = 0xffffffff,
.name = "Generic PHY", .name = "Generic PHY",
.soft_reset = genphy_soft_reset, .soft_reset = genphy_no_soft_reset,
.config_init = genphy_config_init, .config_init = genphy_config_init,
.features = PHY_GBIT_FEATURES | SUPPORTED_MII | .features = PHY_GBIT_FEATURES | SUPPORTED_MII |
SUPPORTED_AUI | SUPPORTED_FIBRE | SUPPORTED_AUI | SUPPORTED_FIBRE |
......
...@@ -837,6 +837,10 @@ int genphy_read_status(struct phy_device *phydev); ...@@ -837,6 +837,10 @@ int genphy_read_status(struct phy_device *phydev);
int genphy_suspend(struct phy_device *phydev); int genphy_suspend(struct phy_device *phydev);
int genphy_resume(struct phy_device *phydev); int genphy_resume(struct phy_device *phydev);
int genphy_soft_reset(struct phy_device *phydev); int genphy_soft_reset(struct phy_device *phydev);
static inline int genphy_no_soft_reset(struct phy_device *phydev)
{
return 0;
}
void phy_driver_unregister(struct phy_driver *drv); void phy_driver_unregister(struct phy_driver *drv);
void phy_drivers_unregister(struct phy_driver *drv, int n); void phy_drivers_unregister(struct phy_driver *drv, int n);
int phy_driver_register(struct phy_driver *new_driver, struct module *owner); int phy_driver_register(struct phy_driver *new_driver, struct module *owner);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment