Thread (26 messages) flat view 26 messages, 5 authors, 2016-06-17

Re: [PATCH] net: stmmac: dwmac-rk: keep PHY up for WoL

From: Heiko Stübner <heiko@sntech.de>
Date: 2016-06-06 20:45:17
Also in: lkml

Hi,

Am Freitag, 3. Juni 2016, 10:29:20 schrieb Vincent Palatin:
quoted hunk ↗ jump to hunk
Do not shutdown the PHY if Wake-on-Lan is enabled, else it cannot wake
us up.

Signed-off-by: Vincent Palatin <redacted>
---
 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;
+
Hmm, this looks like it would also block the initial setup of clocks and phy?
platform_device + device struct are created before probe gets called, so 
something could set the wakeup flag before the driver initially probes?


Confused,
Heiko
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help