[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 6 Jun 2016 14:00:58 -0700
From: Vincent Palatin <vpalatin@...omium.org>
To: Heiko Stübner <heiko@...ech.de>
Cc: netdev@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
Alexandre Torgue <alexandre.torgue@...com>,
Giuseppe Cavallaro <peppe.cavallaro@...com>,
Douglas Anderson <dianders@...omium.org>
Subject: Re: [PATCH] net: stmmac: dwmac-rk: keep PHY up for WoL
On Mon, Jun 6, 2016 at 1:45 PM, Heiko Stübner <heiko@...ech.de> wrote:
> Hi,
>
> Am Freitag, 3. Juni 2016, 10:29:20 schrieb 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@...omium.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;
>> +
>
> Hmm, this looks like it would also block the initial setup of clocks and phy?
Yes, that's bad. Doug told me so but I forget to CC him on the
previous submission.
I will do another version.
> platform_device + device struct are created before probe gets called, so
> something could set the wakeup flag before the driver initially probes?
The device tree 'wakeup' attribute likely does it.
--
Vincent
Powered by blists - more mailing lists