From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>, netdev <netdev@vger.kernel.org>,
Heiner Kallweit <hkallweit1@gmail.com>,
Oleksij Rempel <linux@rempel-privat.de>
Subject: Re: [PATCH v4 net-next 7/9] net: phy: Add phy_support_eee() indicating MAC support EEE
Date: Thu, 22 Jun 2023 16:20:28 +0100 [thread overview]
Message-ID: <ZJRmvIldnyYBbBYa@shell.armlinux.org.uk> (raw)
In-Reply-To: <6951e7fa-a922-c498-9bb9-eaae5f47faaf@gmail.com>
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@lunn.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!
next prev parent reply other threads:[~2023-06-22 15:20 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-18 18:41 [PATCH v4 net-next 0/9] net: ethernet: Rework EEE Andrew Lunn
2023-06-18 18:41 ` [PATCH v4 net-next 1/9] net: phy-c45: Fix genphy_c45_ethtool_set_eee description Andrew Lunn
2023-06-18 19:18 ` Russell King (Oracle)
2023-06-18 20:30 ` Andrew Lunn
2023-06-18 18:41 ` [PATCH v4 net-next 2/9] net: add helpers for EEE configuration Andrew Lunn
2023-06-19 15:26 ` Florian Fainelli
2023-06-18 18:41 ` [PATCH v4 net-next 3/9] net: phy: Add phydev->enable_tx_lpi to simplify adjust link callbacks Andrew Lunn
2023-06-18 18:41 ` [PATCH v4 net-next 4/9] net: phy: Add helper to set EEE Clock stop enable bit Andrew Lunn
2023-06-18 18:41 ` [PATCH v4 net-next 5/9] net: phy: Keep track of EEE configuration Andrew Lunn
2023-06-18 19:20 ` Russell King (Oracle)
2023-06-19 14:20 ` Simon Horman
2023-06-19 15:27 ` Florian Fainelli
2023-06-18 18:41 ` [PATCH v4 net-next 6/9] net: phy: Immediately call adjust_link if only tx_lpi_enabled changes Andrew Lunn
2023-06-18 18:41 ` [PATCH v4 net-next 7/9] net: phy: Add phy_support_eee() indicating MAC support EEE Andrew Lunn
2023-06-19 15:21 ` Florian Fainelli
2023-06-22 15:20 ` Russell King (Oracle) [this message]
2023-06-22 15:43 ` Andrew Lunn
2023-06-18 18:41 ` [PATCH v4 net-next 8/9] net: fec: Move fec_enet_eee_mode_set() and helper earlier Andrew Lunn
2023-06-19 15:22 ` Florian Fainelli
2023-06-18 18:41 ` [PATCH v4 net-next 9/9] net: fec: Fixup EEE Andrew Lunn
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=ZJRmvIldnyYBbBYa@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=andrew@lunn.ch \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=linux@rempel-privat.de \
--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 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).