lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d19897f450cc22a629e0c408b72fbc702ca8fe8c.camel@analog.com>
Date:   Mon, 16 Sep 2019 06:44:23 +0000
From:   "Ardelean, Alexandru" <alexandru.Ardelean@...log.com>
To:     "f.fainelli@...il.com" <f.fainelli@...il.com>,
        "andrew@...n.ch" <andrew@...n.ch>
CC:     "mkubecek@...e.cz" <mkubecek@...e.cz>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "hkallweit1@...il.com" <hkallweit1@...il.com>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "mark.rutland@....com" <mark.rutland@....com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>
Subject: Re: [PATCH v4 2/2] net: phy: adin: implement Energy Detect Powerdown
 mode via phy-tunable

On Sun, 2019-09-15 at 08:11 -0700, Florian Fainelli wrote:
> [External]
> 
> 
> 
> On 9/14/2019 8:29 AM, Andrew Lunn wrote:
> > On Thu, Sep 12, 2019 at 07:28:12PM +0300, Alexandru Ardelean wrote:
> > 
> > > +static int adin_set_edpd(struct phy_device *phydev, u16 tx_interval)
> > > +{
> > > +	u16 val;
> > > +
> > > +	if (tx_interval == ETHTOOL_PHY_EDPD_DISABLE)
> > > +		return phy_clear_bits(phydev, ADIN1300_PHY_CTRL_STATUS2,
> > > +				(ADIN1300_NRG_PD_EN | ADIN1300_NRG_PD_TX_EN));
> > > +
> > > +	val = ADIN1300_NRG_PD_EN;
> > > +
> > > +	switch (tx_interval) {
> > > +	case 1000: /* 1 second */
> > > +		/* fallthrough */
> > > +	case ETHTOOL_PHY_EDPD_DFLT_TX_MSECS:
> > > +		val |= ADIN1300_NRG_PD_TX_EN;
> > > +		/* fallthrough */
> > > +	case ETHTOOL_PHY_EDPD_NO_TX:
> > > +		break;
> > > +	default:
> > > +		return -EINVAL;
> > > +	}
> > > +
> > > +	return phy_modify(phydev, ADIN1300_PHY_CTRL_STATUS2,
> > > +			  (ADIN1300_NRG_PD_EN | ADIN1300_NRG_PD_TX_EN),
> > > +			  val);
> > > +}
> > > +
> > >  
> > > +	rc = adin_set_edpd(phydev, 1);
> > > +	if (rc < 0)
> > > +		return rc;
> > 
> > Hi Alexandru
> > 
> > Shouldn't this be adin_set_edpd(phydev, 1000);
> 
> That does sound like the intended use, or use
> ETHTOOL_PHY_EDPD_DFLT_TX_MSECS, with that fixed:

Ack.

Many thanks for catching this.
I missed it when re-spinning.

> 
> Reviewed-by: Florian Fainelli <f.fainelli@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ