@@ -3153,24 +3153,11 @@ static int phy_probe(struct device *dev)
of_set_phy_supported(phydev);
phy_advertise_supported(phydev);
- /* Get PHY default EEE advertising modes and handle them as potentially
- * safe initial configuration.
+ /* Clear EEE advertising until the MAC indicates it also
+ * supports EEE.
*/
- err = genphy_c45_read_eee_adv(phydev, phydev->advertising_eee);
- if (err)
- goto out;
-
- /* There is no "enabled" flag. If PHY is advertising, assume it is
- * kind of enabled.
- */
- phydev->eee_enabled = !linkmode_empty(phydev->advertising_eee);
-
- /* Some PHYs may advertise, by default, not support EEE modes. So,
- * we need to clean them.
- */
- if (phydev->eee_enabled)
- linkmode_and(phydev->advertising_eee, phydev->supported_eee,
- phydev->advertising_eee);
+ linkmode_zero(phydev->advertising_eee);
+ phydev->eee_enabled = false;
/* Get the EEE modes we want to prohibit. We will ask
* the PHY stop advertising these mode later on
EEE should only be advertised if the MAC supports it. Clear advertising_eee by default. If the MAC indicates it supports EEE by calling phy_support_eee() advertising_eee will be set to supported_eee. When the PHY is started, EEE registers will then be configured. Signed-off-by: Andrew Lunn <andrew@lunn.ch> --- drivers/net/phy/phy_device.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-)