kernel: update kernel 4.9 to 4.9.37
[openwrt/staging/lynxis.git] / target / linux / mvebu / patches-4.9 / 404-net-phy-restart-phy-autonegotiation-after-EEE-advert.patch
index 72951e8a3a8ee6189d83426beaa5c1fc81c5769a..35d7ba9febb02197c336cccc3c82c5fdb0d5e97b 100644 (file)
@@ -12,7 +12,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
 
 --- a/drivers/net/phy/phy.c
 +++ b/drivers/net/phy/phy.c
-@@ -1343,16 +1343,33 @@ EXPORT_SYMBOL(phy_ethtool_get_eee);
+@@ -1343,19 +1343,36 @@ EXPORT_SYMBOL(phy_ethtool_get_eee);
   */
  int phy_ethtool_set_eee(struct phy_device *phydev, struct ethtool_eee *data)
  {
@@ -30,6 +30,9 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
 +
        adv = ethtool_adv_to_mmd_eee_adv_t(data->advertised) & cap;
  
+       /* Mask prohibited EEE modes */
+       adv &= ~phydev->eee_broken_modes;
 -      return phy_write_mmd(phydev, MDIO_MMD_AN, MDIO_AN_EEE_ADV, adv);
 +      if (old_adv != adv) {
 +              ret = phy_write_mmd(phydev, MDIO_MMD_AN, MDIO_AN_EEE_ADV, adv);