From: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: Simon Horman <horms+renesas@verge.net.au>,
netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: Re: [PATCHv2 1/5] sh_eth: add generic wake-on-lan support via magic packet
Date: Mon, 19 Dec 2016 17:41:59 +0100 [thread overview]
Message-ID: <20161219164159.GF21006@bigcity.dyn.berto.se> (raw)
In-Reply-To: <079800f0-2e80-7a0b-01e2-51e09f05345c@cogentembedded.com>
Hi Sergei,
On 2016-12-18 00:50:59 +0300, Sergei Shtylyov wrote:
> Hello!
>
> On 12/12/2016 07:09 PM, Niklas Söderlund wrote:
>
> Not the complete review yet, just some superficial comments.
>
> > Add generic functionality to support Wake-on-Lan using MagicPacket which
>
> LAN.
>
> > 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
> > WoL yet.
>
> [...]
>
> > diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
> > index 05b0dc5..87640b9 100644
> > --- a/drivers/net/ethernet/renesas/sh_eth.c
> > +++ b/drivers/net/ethernet/renesas/sh_eth.c
> [...]
> > @@ -3150,15 +3187,67 @@ static int sh_eth_drv_remove(struct platform_device *pdev)
> [...]
> > +static int sh_eth_wol_restore(struct net_device *ndev)
> > +{
> > + struct sh_eth_private *mdp = netdev_priv(ndev);
> > + int ret;
> > +
> > + napi_enable(&mdp->napi);
> > +
> > + /* Disable MagicPacket */
> > + sh_eth_modify(ndev, ECMR, ECMR_PMDE, 0);
> > +
> > + /* The device need to be reset to restore MagicPacket logic
>
> Needs.
>
> [...]
> > index d050f37..4ceed00 100644
> > --- a/drivers/net/ethernet/renesas/sh_eth.h
> > +++ b/drivers/net/ethernet/renesas/sh_eth.h
> > @@ -493,6 +493,7 @@ struct sh_eth_cpu_data {
> > unsigned shift_rd0:1; /* shift Rx descriptor word 0 right by 16 */
> > unsigned rmiimode:1; /* EtherC has RMIIMODE register */
> > unsigned rtrate:1; /* EtherC has RTRATE register */
> > + unsigned magic:1; /* EtherC has ECMR.PMDE and ECSR.MPD */
>
> After looking at the SH7734/63 manuals it became obvious that PMDE was a
> result of typo, the bit is called MPDE actually, the current name doesn't
> make sense anyway. Care to fix?
Sure, I add fixup patch to the front of this series which cleans this up
before adding WoL support. Or would you prefer I sent a separate patch
and have the WoL series depend on it?
>
> MBR, Sergei
>
--
Regards,
Niklas Söderlund
next prev parent reply other threads:[~2016-12-19 16:42 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-12 16:09 [PATCHv2 0/5] sh_eth: add wake-on-lan support via magic packet Niklas Söderlund
2016-12-12 16:09 ` [PATCHv2 1/5] sh_eth: add generic " Niklas Söderlund
2016-12-13 13:03 ` Geert Uytterhoeven
2016-12-13 16:27 ` Niklas Söderlund
2016-12-17 21:50 ` Sergei Shtylyov
2016-12-19 16:41 ` Niklas Söderlund [this message]
2016-12-19 16:56 ` Sergei Shtylyov
2016-12-18 20:26 ` Sergei Shtylyov
2016-12-19 16:39 ` Niklas Söderlund
2016-12-19 17:11 ` Geert Uytterhoeven
2016-12-24 21:53 ` Sergei Shtylyov
2016-12-12 16:09 ` [PATCHv2 2/5] sh_eth: enable wake-on-lan for Gen2 devices Niklas Söderlund
2016-12-13 12:52 ` Geert Uytterhoeven
2016-12-14 13:37 ` Sergei Shtylyov
2016-12-17 21:52 ` Sergei Shtylyov
2016-12-12 16:09 ` [PATCHv2 3/5] sh_eth: enable wake-on-lan for r8a7740/armadillo Niklas Söderlund
2016-12-13 12:51 ` Geert Uytterhoeven
2016-12-12 16:09 ` [PATCHv2 4/5] sh_eth: enable wake-on-lan for sh7743 Niklas Söderlund
2016-12-13 10:59 ` Geert Uytterhoeven
2016-12-12 16:09 ` [PATCHv2 5/5] sh_eth: enable wake-on-lan for sh7763 Niklas Söderlund
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161219164159.GF21006@bigcity.dyn.berto.se \
--to=niklas.soderlund@ragnatech.se \
--cc=geert@linux-m68k.org \
--cc=horms+renesas@verge.net.au \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sergei.shtylyov@cogentembedded.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).