[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87e3f9e6-0f5a-986c-772d-006cb25b9fd9@cogentembedded.com>
Date: Sun, 18 Dec 2016 23:26:11 +0300
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: Niklas Söderlund
<niklas.soderlund+renesas@...natech.se>,
Simon Horman <horms+renesas@...ge.net.au>,
netdev@...r.kernel.org, linux-renesas-soc@...r.kernel.org
Cc: Geert Uytterhoeven <geert@...ux-m68k.org>
Subject: Re: [PATCHv2 1/5] sh_eth: add generic wake-on-lan support via magic
packet
Hello.
On 12/12/2016 07:09 PM, Niklas Söderlund wrote:
> Add generic functionality to support Wake-on-Lan using MagicPacket which
> are supported by at least a few versions of sh_eth. Only add
> functionality for WoL, no specific sh_eth version are marked to support
Versions.
> WoL yet.
>
> WoL is enabled in the suspend callback by setting MagicPacket detection
> and disabling all interrupts expect MagicPacket. In the resume path the
> driver needs to reset the hardware to rearm the WoL logic, this prevents
> the driver from simply restoring the registers and to take advantage of
> that sh_eth was not suspended to reduce resume time. To reset the
> hardware the driver close and reopens the device just like it would do
Closes.
> in a normal suspend/resume scenario without WoL enabled, but it both
> close and open the device in the resume callback since the device needs
Closes and opens.
> to be open for WoL to work.
> One quirk needed for WoL is that the module clock needs to be prevented
> from being switched off by Runtime PM. To keep the clock alive the
I tried to find the code in question and failed, getting muddled in the
RPM maze. Could you point at this code for my education? :-)
> suspend callback need to call clk_enable() directly to increase the
My main concern is why we need to manipulate the clock directly --
can't you call RPM to achieve the same effect?
> usage count of the clock. Then when Runtime PM decreases the clock usage
> count it won't reach 0 and be switched off.
You mean it does this even though we don't call pr_runtime_put_sync()
as done in sh_eth_close()?
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@...natech.se>
[...]
MBR, Sergei
Powered by blists - more mailing lists