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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZJRmvIldnyYBbBYa@shell.armlinux.org.uk>
Date: Thu, 22 Jun 2023 16:20:28 +0100
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Florian Fainelli <f.fainelli@...il.com>
Cc: Andrew Lunn <andrew@...n.ch>, netdev <netdev@...r.kernel.org>,
	Heiner Kallweit <hkallweit1@...il.com>,
	Oleksij Rempel <linux@...pel-privat.de>
Subject: Re: [PATCH v4 net-next 7/9] net: phy: Add phy_support_eee()
 indicating MAC support EEE

On Mon, Jun 19, 2023 at 04:21:09PM +0100, Florian Fainelli wrote:
> 
> 
> On 6/18/2023 7:41 PM, Andrew Lunn wrote:
> > In order for EEE to operate, both the MAC and the PHY need to support
> > it, similar to how pause works. Copy the pause concept and add the
> > call phy_support_eee() which the MAC makes after connecting the PHY to
> > indicate it supports EEE. phylib will then advertise EEE when auto-neg
> > is performed.
> > 
> > Signed-off-by: Andrew Lunn <andrew@...n.ch>
> > ---
> >   drivers/net/phy/phy_device.c | 18 ++++++++++++++++++
> >   include/linux/phy.h          |  3 ++-
> >   2 files changed, 20 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
> > index 2cad9cc3f6b8..ae2ebe1df15c 100644
> > --- a/drivers/net/phy/phy_device.c
> > +++ b/drivers/net/phy/phy_device.c
> > @@ -2762,6 +2762,24 @@ void phy_advertise_supported(struct phy_device *phydev)
> >   }
> >   EXPORT_SYMBOL(phy_advertise_supported);
> > +/**
> > + * phy_support_eee - Enable support of EEE
> > + * @phydev: target phy_device struct
> > + *
> > + * Description: Called by the MAC to indicate is supports Energy
> 
> typo: is/it
> 
> > + * Efficient Ethernet. This should be called before phy_start() in
> > + * order that EEE is negotiated when the link comes up as part of
> > + * phy_start(). EEE is enabled by default when the hardware supports
> > + * it.
> > + */
> > +void phy_support_eee(struct phy_device *phydev)
> > +{
> > +	linkmode_copy(phydev->advertising_eee, phydev->supported_eee);
> > +	phydev->eee_cfg.tx_lpi_enabled = true;
> > +	phydev->eee_cfg.eee_enabled = true;
> > +}
> > +EXPORT_SYMBOL(phy_support_eee);
> 
> A bit worried that naming this function might be confusing driver authors
> that this is a function that reports whether EEE is supported, though I am
> not able to come up with better names.

Possibly phy_enable_eee_support() ?

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ