[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211206101326.1022527-3-philippe.schenker@toradex.com>
Date: Mon, 6 Dec 2021 11:13:26 +0100
From: Philippe Schenker <philippe.schenker@...adex.com>
To: netdev@...r.kernel.org, Joakim Zhang <qiangqing.zhang@....com>,
Fabio Estevam <festevam@...il.com>,
Fugang Duan <fugang.duan@....com>,
"David S . Miller" <davem@...emloft.net>,
Russell King <linux@...linux.org.uk>,
Andrew Lunn <andrew@...n.ch>, Jakub Kicinski <kuba@...nel.org>
Cc: Philippe Schenker <philippe.schenker@...adex.com>,
linux-kernel@...r.kernel.org
Subject: [RFC PATCH 2/2] net: fec: reset phy in resume if it was powered down
If a board solely rely on a GPIO to reset the PHY after power-up, the
PHY won't work after a power-down where the power was cut.
Reset the PHY after power-enable in fec_resume.
Signed-off-by: Philippe Schenker <philippe.schenker@...adex.com>
---
drivers/net/ethernet/freescale/fec_main.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 92840f18c48f..41c3825cd768 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -4118,6 +4118,10 @@ static int __maybe_unused fec_resume(struct device *dev)
ret = regulator_enable(fep->reg_phy);
if (ret)
return ret;
+
+ ret = fec_reset_phy(ndev);
+ if (ret)
+ return ret;
}
rtnl_lock();
--
2.34.0
Powered by blists - more mailing lists