dsa: don't enable phydevs during initialization

Signed-off-by: Jan Sondhauss <jan.sondhauss@wago.com>
This commit is contained in:
Jan Sondhauss
2020-12-16 16:14:48 +01:00
committed by Oleg Karfich
parent cd7d9cd871
commit 815a6700d2
2 changed files with 5 additions and 2 deletions
-1
View File
@@ -1547,7 +1547,6 @@ int phy_attach_direct(struct net_device *dev, struct phy_device *phydev,
if (err)
goto error;
phy_resume(phydev);
if (!phydev->is_on_sfp_module)
phy_led_triggers_register(phydev);
+5 -1
View File
@@ -2476,6 +2476,7 @@ static int dsa_slave_phy_connect(struct net_device *slave_dev, int addr,
{
struct dsa_port *dp = dsa_slave_to_port(slave_dev);
struct dsa_switch *ds = dp->ds;
int res;
slave_dev->phydev = mdiobus_get_phy(ds->slave_mii_bus, addr);
if (!slave_dev->phydev) {
@@ -2485,7 +2486,10 @@ static int dsa_slave_phy_connect(struct net_device *slave_dev, int addr,
slave_dev->phydev->dev_flags |= flags;
return phylink_connect_phy(dp->pl, slave_dev->phydev);
res = phylink_connect_phy(dp->pl, slave_dev->phydev);
phy_suspend(slave_dev->phydev);
return res;
}
static int dsa_slave_phy_setup(struct net_device *slave_dev)