[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <847f5ce9-c5c5-956b-5c8f-a0a03bece3bc@cogentembedded.com>
Date: Tue, 1 Aug 2017 16:25:15 +0300
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: Niklas Söderlund
<niklas.soderlund+renesas@...natech.se>
Cc: Geert Uytterhoeven <geert@...ux-m68k.org>, netdev@...r.kernel.org,
linux-renesas-soc@...r.kernel.org
Subject: Re: [PATCH v3 1/2] ravb: add wake-on-lan support via magic packet
Hello!
On 08/01/2017 01:14 PM, Niklas Söderlund wrote:
> 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 ravb was not suspended to reduce resume time. To reset the
> hardware the driver closes the device, sets it in reset mode and reopens
> the device just like it would do in a normal suspend/resume scenario
> without WoL enabled, but it both closes and opens the device in the
> resume callback since the device needs to be reset 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
> suspend callback need to call clk_enable() directly to increase the
> usage count of the clock. Then when Runtime PM decreases the clock usage
> count it won't reach 0 and be switched off.
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@...natech.se>
[...]
Acked-by: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
MBR, Sergei
Powered by blists - more mailing lists