From 82c44aaa86f7523888ae02a314890baa3404cfd7 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 19 Apr 2018 16:02:37 +0200 Subject: [PATCH] 4.9-stable patches added patches: revert-net-phy-micrel-restore-led_mode-and-clk_sel-on.patch --- ...crel-restore-led_mode-and-clk_sel-on.patch | 102 ++++++++++++++++++ queue-4.9/series | 1 + 2 files changed, 103 insertions(+) create mode 100644 queue-4.9/revert-net-phy-micrel-restore-led_mode-and-clk_sel-on.patch diff --git a/queue-4.9/revert-net-phy-micrel-restore-led_mode-and-clk_sel-on.patch b/queue-4.9/revert-net-phy-micrel-restore-led_mode-and-clk_sel-on.patch new file mode 100644 index 00000000000..339e692d03d --- /dev/null +++ b/queue-4.9/revert-net-phy-micrel-restore-led_mode-and-clk_sel-on.patch @@ -0,0 +1,102 @@ +From 26ee460e231f9d1a07a8f2803397de7f9a47415e Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Thu, 19 Apr 2018 16:00:32 +0200 +Subject: Revert "net: phy: micrel: Restore led_mode and clk_sel on resume" + +From: Greg Kroah-Hartman + +This reverts commit d7ba3c00047dfd88fe0360a2d27169b54c88c4f1 which was +commit 79e498a9c7da0737829ff864aae44df434105676 upstream. + +Turns out it breaks things, so drop it. + +Reported-by: Naresh Kamboju +Cc: Leonard Crestez +Cc: Florian Fainelli +Cc: David S. Miller +Cc: Sasha Levin +Cc: Dan Rue +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/phy/micrel.c | 42 ++++++++++++++---------------------------- + 1 file changed, 14 insertions(+), 28 deletions(-) + +--- a/drivers/net/phy/micrel.c ++++ b/drivers/net/phy/micrel.c +@@ -268,12 +268,23 @@ out: + return ret; + } + +-/* Some config bits need to be set again on resume, handle them here. */ +-static int kszphy_config_reset(struct phy_device *phydev) ++static int kszphy_config_init(struct phy_device *phydev) + { + struct kszphy_priv *priv = phydev->priv; ++ const struct kszphy_type *type; + int ret; + ++ if (!priv) ++ return 0; ++ ++ type = priv->type; ++ ++ if (type->has_broadcast_disable) ++ kszphy_broadcast_disable(phydev); ++ ++ if (type->has_nand_tree_disable) ++ kszphy_nand_tree_disable(phydev); ++ + if (priv->rmii_ref_clk_sel) { + ret = kszphy_rmii_clk_sel(phydev, priv->rmii_ref_clk_sel_val); + if (ret) { +@@ -284,7 +295,7 @@ static int kszphy_config_reset(struct ph + } + + if (priv->led_mode >= 0) +- kszphy_setup_led(phydev, priv->type->led_mode_reg, priv->led_mode); ++ kszphy_setup_led(phydev, type->led_mode_reg, priv->led_mode); + + if (phy_interrupt_is_valid(phydev)) { + int ctl = phy_read(phydev, MII_BMCR); +@@ -300,25 +311,6 @@ static int kszphy_config_reset(struct ph + return 0; + } + +-static int kszphy_config_init(struct phy_device *phydev) +-{ +- struct kszphy_priv *priv = phydev->priv; +- const struct kszphy_type *type; +- +- if (!priv) +- return 0; +- +- type = priv->type; +- +- if (type->has_broadcast_disable) +- kszphy_broadcast_disable(phydev); +- +- if (type->has_nand_tree_disable) +- kszphy_nand_tree_disable(phydev); +- +- return kszphy_config_reset(phydev); +-} +- + static int ksz8041_config_init(struct phy_device *phydev) + { + struct device_node *of_node = phydev->mdio.dev.of_node; +@@ -723,14 +715,8 @@ static int kszphy_suspend(struct phy_dev + + static int kszphy_resume(struct phy_device *phydev) + { +- int ret; +- + genphy_resume(phydev); + +- ret = kszphy_config_reset(phydev); +- if (ret) +- return ret; +- + /* Enable PHY Interrupts */ + if (phy_interrupt_is_valid(phydev)) { + phydev->interrupts = PHY_INTERRUPT_ENABLED; diff --git a/queue-4.9/series b/queue-4.9/series index 7c75239caa1..032264f5323 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -65,3 +65,4 @@ slip-check-if-rstate-is-initialized-before-uncompressing.patch vhost-fix-vhost_vq_access_ok-log-check.patch lan78xx-correctly-indicate-invalid-otp.patch arm64-futex-mask-__user-pointers-prior-to-dereference.patch +revert-net-phy-micrel-restore-led_mode-and-clk_sel-on.patch -- 2.47.3