Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7f5c6d7c authored by Vivien Didelot's avatar Vivien Didelot Committed by David S. Miller
Browse files

net: dsa: mv88e6xxx: call phy_init_eee



It is safer to init the EEE before the DSA layer call
phy_ethtool_set_eee, as sf2 and qca8k are doing.

Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b11af0ce
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -855,6 +855,12 @@ static int mv88e6xxx_set_eee(struct dsa_switch *ds, int port,
	struct mv88e6xxx_chip *chip = ds->priv;
	int err;

	if (e->eee_enabled) {
		err = phy_init_eee(phydev, 0);
		if (err)
			return err;
	}

	mutex_lock(&chip->reg_lock);
	err = mv88e6xxx_energy_detect_write(chip, port, e);
	mutex_unlock(&chip->reg_lock);