All of lore.kernel.org
 help / color / mirror / Atom feed
From: Raju Lakkaraju <Raju.Lakkaraju@microsemi.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: <netdev@vger.kernel.org>, <f.fainelli@gmail.com>,
	<Allan.Nielsen@microsemi.com>
Subject: Re: [PATCH net-next 1/2] net: phy: Add Wake-on-LAN driver for Microsemi PHYs.
Date: Tue, 4 Oct 2016 19:42:51 +0530	[thread overview]
Message-ID: <20161004141250.GA29274@microsemi.com> (raw)
In-Reply-To: <20160928162705.GB25553@lunn.ch>

Hi Andrew,

Thank you for code review and valuable comments.

On Wed, Sep 28, 2016 at 06:27:05PM +0200, Andrew Lunn wrote:
> EXTERNAL EMAIL
> 
> 
> > +#define MSCC_PHY_WOL_MAC_CONTROL       27
> > +#define EDGE_RATE_CNTL_POS             5
> > +#define EDGE_RATE_CNTL_MASK            0x00E0
> 
> This patch does not require these two #defines.
> 
> Please indicate in the cover note if the patches depends on other
> patches in order to cleanly apply. Or if these patches are going to
> conflict with some other patches.
> 

Accepted. I will remove those 2 defines.

> > +     reg_val = phy_read(phydev, MSCC_PHY_WOL_MAC_CONTROL);
> > +     if (wol_conf->wolopts & WAKE_MAGICSECURE)
> > +             reg_val |= SECURE_ON_ENABLE;
> > +     else
> > +             reg_val &= ~SECURE_ON_ENABLE;
> > +     phy_write(phydev, MSCC_PHY_WOL_MAC_CONTROL, reg_val);
> > +
> > +     if (wol_conf->wolopts & WAKE_MAGICSECURE) {
> > +             reg_val = wol_conf->sopass[4] << 8;
> > +             reg_val |= wol_conf->sopass[5];
> > +             phy_write(phydev, MSCC_PHY_WOL_LOWER_PASSWD, reg_val);
> > +             reg_val = wol_conf->sopass[2] << 8;
> > +             reg_val |= wol_conf->sopass[3];
> > +             phy_write(phydev, MSCC_PHY_WOL_MID_PASSWD, reg_val);
> > +             reg_val = wol_conf->sopass[0] << 8;
> > +             reg_val |= wol_conf->sopass[1];
> > +             phy_write(phydev, MSCC_PHY_WOL_UPPER_PASSWD, reg_val);
> > +     } else {
> > +             phy_write(phydev, MSCC_PHY_WOL_LOWER_PASSWD, 0);
> > +             phy_write(phydev, MSCC_PHY_WOL_MID_PASSWD, 0);
> > +             phy_write(phydev, MSCC_PHY_WOL_UPPER_PASSWD, 0);
> > +     }
> 
> Wouldn't it be better to set the password, and then enable the
> password feature?
> 

Accepted. I will change.

> I don't know much about WOL. Hopefully Florian will add further
> comments.
> 
>          Andrew

---
Thanks,
Raju.

  reply	other threads:[~2016-10-04 14:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-28 12:01 [PATCH net-next 0/2] net: phy: Add WoL and Auto Mdix drivers for Microsemi PHYs Raju Lakkaraju
2016-09-28 12:01 ` [PATCH net-next 1/2] net: phy: Add Wake-on-LAN driver " Raju Lakkaraju
2016-09-28 16:27   ` Andrew Lunn
2016-10-04 14:12     ` Raju Lakkaraju [this message]
2016-09-28 17:37   ` Florian Fainelli
2016-10-04 14:18     ` Raju Lakkaraju
2016-09-28 12:01 ` [PATCH net-next 2/2] net: phy: Add PHY Auto/Mdi/Mdix set " Raju Lakkaraju
2016-09-28 20:24   ` Andrew Lunn
2016-10-04 14:31     ` Raju Lakkaraju
2016-10-05  7:18       ` Andrew Lunn
2016-10-06 11:09         ` Florian Fainelli
2016-10-17 12:06           ` Raju Lakkaraju
2016-10-06 10:57     ` Florian Fainelli
2016-10-17 11:46       ` Raju Lakkaraju
2016-10-17 12:10     ` Raju Lakkaraju

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=20161004141250.GA29274@microsemi.com \
    --to=raju.lakkaraju@microsemi.com \
    --cc=Allan.Nielsen@microsemi.com \
    --cc=andrew@lunn.ch \
    --cc=f.fainelli@gmail.com \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.