Thread (18 messages) 18 messages, 6 authors, 2021-02-11

Re: [PATCH] net: phy: micrel: reconfigure the phy on resume

From: Heiner Kallweit <hkallweit1@gmail.com>
Date: 2021-01-08 16:32:37
Also in: lkml

On 08.01.2021 16:45, Claudiu Beznea wrote:
KSZ9131 is used in setups with SAMA7G5. SAMA7G5 supports a special
power saving mode (backup mode) that cuts the power for almost all
parts of the SoC. The rail powering the ethernet PHY is also cut off.
When resuming, in case the PHY has been configured on probe with
slew rate or DLL settings these needs to be restored thus call
driver's config_init() on resume.
When would the SoC enter this backup mode? And would it suspend the
MDIO bus before cutting power to the PHY?
I'm asking because in mdio_bus_phy_restore() we call phy_init_hw()
already (that calls the driver's config_init).
quoted hunk ↗ jump to hunk
Signed-off-by: Claudiu Beznea <redacted>
---
 drivers/net/phy/micrel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index 3fe552675dd2..52d3a0480158 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -1077,7 +1077,7 @@ static int kszphy_resume(struct phy_device *phydev)
 	 */
 	usleep_range(1000, 2000);
 
-	ret = kszphy_config_reset(phydev);
+	ret = phydev->drv->config_init(phydev);
 	if (ret)
 		return ret;
 
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help