mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Oleksij Rempel <o.rempel@pengutronix.de>,
	Wei Fang <wei.fang@nxp.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>
Cc: kernel@pengutronix.de, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, Shenwei Wang <shenwei.wang@nxp.com>,
	Clark Wang <xiaoning.wang@nxp.com>,
	NXP Linux Team <linux-imx@nxp.com>
Subject: Re: [PATCH net-next v5 6/8] net: phy: Add phy_support_eee() indicating MAC support EEE
Date: Thu, 22 Feb 2024 20:52:25 -0800	[thread overview]
Message-ID: <9e37a9e9-7722-407c-a2a5-b8c04b68f594@gmail.com> (raw)
In-Reply-To: <20240221062107.778661-7-o.rempel@pengutronix.de>



On 2/20/2024 10:21 PM, Oleksij Rempel wrote:
> From: Andrew Lunn <andrew@lunn.ch>
> 
> In order for EEE to operate, both the MAC and the PHY need to support
> it, similar to how pause works. 

Kinda, a number of PHYs have added support for SmartEEE or AutoGrEEEn in 
order to provide some EEE-like power savings with non-EEE capable MACs.

Oleksij  did not you have a patch series at some point that introduced a 
smarteee field in the phy_device structure to reflect that? I thought 
that had been accepted, but maybe not.

> 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>
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---
>   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 2eefee970851..269d3c7f0849 100644
> --- a/drivers/net/phy/phy_device.c
> +++ b/drivers/net/phy/phy_device.c
> @@ -2910,6 +2910,24 @@ void phy_advertise_eee_all(struct phy_device *phydev)
>   }
>   EXPORT_SYMBOL_GPL(phy_advertise_eee_all);
>   
> +/**
> + * phy_support_eee - Enable support of EEE
> + * @phydev: target phy_device struct
> + *
> + * Description: Called by the MAC to indicate is supports Energy
> + * 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.

That comment is a bit confusing without mentioning how the hardware 
default state wrt. EEE is being factored in, can we have some details here?
-- 
Florian

  reply	other threads:[~2024-02-23  4:52 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-21  6:20 [PATCH net-next v5 0/8] net: ethernet: Rework EEE Oleksij Rempel
2024-02-21  6:21 ` [PATCH net-next v5 1/8] net: add helpers for EEE configuration Oleksij Rempel
2024-02-23  4:53   ` Florian Fainelli
2024-02-21  6:21 ` [PATCH net-next v5 2/8] net: phy: Add phydev->enable_tx_lpi to simplify adjust link callbacks Oleksij Rempel
2024-02-23  5:36   ` Wei Fang
2024-02-23  6:58     ` Heiner Kallweit
2024-02-21  6:21 ` [PATCH net-next v5 3/8] net: phy: Add helper to set EEE Clock stop enable bit Oleksij Rempel
2024-02-23  4:47   ` Florian Fainelli
2024-02-23  8:54     ` Oleksij Rempel
2024-02-21  6:21 ` [PATCH net-next v5 4/8] net: phy: Keep track of EEE configuration Oleksij Rempel
2024-02-23  3:25   ` Jakub Kicinski
2024-02-23  4:53   ` Florian Fainelli
2024-02-21  6:21 ` [PATCH net-next v5 5/8] net: phy: Immediately call adjust_link if only tx_lpi_enabled changes Oleksij Rempel
2024-02-23  4:51   ` Florian Fainelli
2024-02-21  6:21 ` [PATCH net-next v5 6/8] net: phy: Add phy_support_eee() indicating MAC support EEE Oleksij Rempel
2024-02-23  4:52   ` Florian Fainelli [this message]
2024-02-23  5:47     ` Oleksij Rempel
2024-02-23 11:21     ` Russell King (Oracle)
2024-02-21  6:21 ` [PATCH net-next v5 7/8] net: fec: Move fec_enet_eee_mode_set() and helper earlier Oleksij Rempel
2024-02-23  6:03   ` Wei Fang
2024-02-21  6:21 ` [PATCH net-next v5 8/8] net: fec: Fixup EEE Oleksij Rempel
2024-02-23  6:03   ` Wei Fang

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=9e37a9e9-7722-407c-a2a5-b8c04b68f594@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=pabeni@redhat.com \
    --cc=shenwei.wang@nxp.com \
    --cc=wei.fang@nxp.com \
    --cc=xiaoning.wang@nxp.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

all inboxes | Powered by JetHome®