Re: [PATCHv2 1/5] sh_eth: add generic wake-on-lan support via magic packet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx>
[...]

MBR, Sergei




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux