public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Nicolai Buchwitz <nb@tipi-net.de>
Cc: "Russell King (Oracle)" <linux@armlinux.org.uk>, netdev@vger.kernel.org
Subject: Re: RFC: phylink: disable PHY autonomous EEE when MAC manages LPI
Date: Wed, 1 Apr 2026 15:11:24 +0200	[thread overview]
Message-ID: <48abd3e3-a3ee-4e85-a3d8-20c8ceedfb77@lunn.ch> (raw)
In-Reply-To: <ccb68eaaca5512d5d662326d0817bd50@tipi-net.de>

> Thanks Russell and Andrew. You're both heading in the same direction,
> so to make sure I understand correctly:
> 
> 1. Add a new phylib interface (separate from phy_ethtool_set_eee) to
>    control PHY-autonomous EEE, e.g. phy_set_autonomous_eee(phydev,
>    enable) and phy_get_autonomous_eee(phydev) to query the current
>    state.

In the end, we want the MAC driver using phylib to just call the
phylib methods for configuring EEE, and the MAC driver should not care
if EEE is actually implemented in the PHY or the MAC. The adjust_link
callback would simply not enable LPI if the PHY is doing EEE.

The phylink API should do the same, the MAC driver should not care, it
calls into phylink, but phylink never tells it to enable LPI.

So any API you add here should only be for phylink to phylib.

> 2. PHY drivers implement it where applicable. BCM54xx AutogrEEEn as
>    the first user, Realtek RTL8211F as a second - it already
>    unconditionally disables PHY-mode EEE in config_init with the same
>    intent.

We might want to think about this lower API, the driver
API. Historically EEE has been a mess because MAC drivers have been
left to implement the whole API, they each did it differently, and
many were wrong. There has been a push over the last few years to put
the core of EEE support onto phylib/phylink, so leaving the MAC
drivers to do a small amount.

We should learn from this, and try to think about what can the phylib
core should do for PHY level EEE, and what does the PHY driver need to
do?  Maybe passing the whole struct ethtool_keee to the PHY driver is
just asking for problems. We want a much simpler API to start with.
Just add an autonomous_eee_disable() call for the moment, leaving it
open to later add a autonomous_eee_enable() call with just the needed
parameters.

Sorry this is different to what i said yesterday. A night of thinking
about it made me refine my thoughts.

      Andrew

  parent reply	other threads:[~2026-04-01 13:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-31 21:27 RFC: phylink: disable PHY autonomous EEE when MAC manages LPI Nicolai Buchwitz
2026-03-31 22:56 ` Andrew Lunn
2026-04-01  7:43   ` Russell King (Oracle)
2026-04-01 12:12     ` Nicolai Buchwitz
2026-04-01 12:48       ` Russell King (Oracle)
2026-04-01 13:11       ` Andrew Lunn [this message]
2026-04-01 15:05         ` Russell King (Oracle)
2026-04-01 15:38           ` Andrew Lunn
2026-04-01 16:02             ` Russell King (Oracle)
2026-04-02  7:53               ` Nicolai Buchwitz
2026-04-02 12:32                 ` Russell King (Oracle)
2026-04-02 13:32                   ` 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=48abd3e3-a3ee-4e85-a3d8-20c8ceedfb77@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=linux@armlinux.org.uk \
    --cc=nb@tipi-net.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