All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: stmmac: dwmac-rk: keep PHY up for WoL
@ 2016-06-03 17:29 Vincent Palatin
  2016-06-06 20:45 ` Heiko Stübner
  2016-06-07  7:23 ` Giuseppe CAVALLARO
  0 siblings, 2 replies; 26+ messages in thread
From: Vincent Palatin @ 2016-06-03 17:29 UTC (permalink / raw)
  To: netdev
  Cc: linux-kernel, Alexandre Torgue, Giuseppe Cavallaro,
	Heiko Stübner, Vincent Palatin

Do not shutdown the PHY if Wake-on-Lan is enabled, else it cannot wake
us up.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
index 0cd3ecf..2e45e75 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
@@ -534,6 +534,10 @@ static int rk_gmac_init(struct platform_device *pdev, void *priv)
 	struct rk_priv_data *bsp_priv = priv;
 	int ret;
 
+	/* Keep the PHY up if we use Wake-on-Lan. */
+	if (device_may_wakeup(&pdev->dev))
+		return 0;
+
 	ret = phy_power_on(bsp_priv, true);
 	if (ret)
 		return ret;
@@ -549,6 +553,10 @@ static void rk_gmac_exit(struct platform_device *pdev, void *priv)
 {
 	struct rk_priv_data *gmac = priv;
 
+	/* The PHY was up for Wake-on-Lan. */
+	if (device_may_wakeup(&pdev->dev))
+		return;
+
 	phy_power_on(gmac, false);
 	gmac_clk_enable(gmac, false);
 }
-- 
2.8.0.rc3.226.g39d4020

^ permalink raw reply related	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2016-06-17  5:38 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-03 17:29 [PATCH] net: stmmac: dwmac-rk: keep PHY up for WoL Vincent Palatin
2016-06-06 20:45 ` Heiko Stübner
2016-06-06 21:00   ` Vincent Palatin
2016-06-07  7:23 ` Giuseppe CAVALLARO
2016-06-08 22:25   ` Vincent Palatin
2016-06-09  0:17     ` Andrew Lunn
2016-06-09 23:00       ` Vincent Palatin
2016-06-10 12:29         ` Giuseppe CAVALLARO
2016-06-11  1:00           ` net: stmmac: dwmac-rk: fixes for Wake-on-Lan on RK3288 Vincent Palatin
2016-06-11  1:00             ` [PATCH 1/3] net: stmmac: allow to split suspend/resume from init/exit callbacks Vincent Palatin
2016-06-11  1:16               ` David Miller
2016-06-11  1:00             ` [PATCH 2/3] net: stmmac: dwmac-rk: keep the PHY up for WoL Vincent Palatin
2016-06-11  1:57               ` Heiko Stuebner
2016-06-15 16:03                 ` Vincent Palatin
2016-06-15 18:32                   ` [PATCH v2 0/3] net: stmmac: dwmac-rk: fixes for Wake-on-Lan on RK3288 Vincent Palatin
2016-06-15 18:32                     ` [PATCH v2 1/3] net: stmmac: allow to split suspend/resume from init/exit callbacks Vincent Palatin
2016-06-15 18:32                     ` [PATCH v2 2/3] net: stmmac: dwmac-rk: keep the PHY up for WoL Vincent Palatin
2016-06-15 18:32                     ` [PATCH v2 3/3] ARM: dts: rockchip: add interrupt for Wake-on-Lan on RK3288 Vincent Palatin
2016-06-16 21:15                     ` [PATCH v2 0/3] net: stmmac: dwmac-rk: fixes " David Miller
2016-06-11  1:00             ` [PATCH 3/3] ARM: dts: rockchip: add interrupt " Vincent Palatin
2016-06-11  1:16             ` net: stmmac: dwmac-rk: fixes " David Miller
2016-06-13  6:46             ` Giuseppe CAVALLARO
2016-06-15 17:04               ` Vincent Palatin
2016-06-16 13:37                 ` Giuseppe CAVALLARO
2016-06-16 14:51                   ` Vincent Palatin
2016-06-17  5:38                     ` Giuseppe CAVALLARO

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.