From: Nicolai Buchwitz <nb@tipi-net.de>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>
Cc: Andrew Lunn <andrew@lunn.ch>, netdev@vger.kernel.org
Subject: Re: RFC: phylink: disable PHY autonomous EEE when MAC manages LPI
Date: Thu, 02 Apr 2026 09:53:37 +0200 [thread overview]
Message-ID: <4950b35ad3df1e8a09d063907dad32a3@tipi-net.de> (raw)
In-Reply-To: <ac1Bj-02_ob7UPjh@shell.armlinux.org.uk>
On 1.4.2026 18:02, Russell King (Oracle) wrote:
> On Wed, Apr 01, 2026 at 05:38:23PM +0200, Andrew Lunn wrote:
>> On Wed, Apr 01, 2026 at 04:05:32PM +0100, Russell King (Oracle) wrote:
>> > On Wed, Apr 01, 2026 at 03:11:24PM +0200, Andrew Lunn wrote:
>> > > > 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.
>> >
>> > This won't work.
>> >
>> > If we mask out eee.tx_lpi_enabled when calling into phylib to tell
>> > phylib drivers to disable SmartEEE (that's what I'm calling it here
>> > because it's easier to type)),
>>
>> We need phylib to handle some state information. Are we doing MAC EEE
>> or SmartEEE? We can then set phydev->enable_tx_lpi == True to indicate
>> if the MAC should be sending LPI indications, if and only if the
>> phylib knows we are doing MAC EEE and it should be enabled because the
>> user said so.
>
> Right, and that's why I suggested phy_disable_autonomous_eee() to tell
> phylib to disable SmartEEE/autonomous EEE support at the PHY
> independent
> of phy_ethtool_set_eee().
>
> I was also suggesting that there's eventually a complementary function
> that says basically "please enable SmartEEE" because we may have phy
> drivers that disable it today.
>
> In absence of either call, phy drivers need to maintain their current
> state.
>
>> However, i think this is down the road. If the MAC driver calls
>> phy_support_eee(), we should call the SmartEEE disable method of the
>> PHY driver. When we add support for SmartEEE then we need this
>> additional state information.
>
> That also works for me.
Thanks both. So if I understand correctly:
1. Add a .disable_autonomous_eee callback to struct phy_driver
2. Call it from phy_support_eee() so MAC drivers don't need to know
or care whether the PHY does (autonomous|smart)eee
3. BCM54xx (AutogrEEEn) and RTL8211F as first users
4. No enable counterpart for now. PHY drivers maintain their current
default behavior unless phy_support_eee() is called.
Sounds good. Sorting out the warts of (autonomous|smart)eee will be
iterative anyway, so starting with just the disable path makes sense
(and hopefully will make setups a bit less broken than they were with
both fighting for LPI).
I'll put the RFC patches together.
Nicolai
next prev parent reply other threads:[~2026-04-02 7:53 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
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 [this message]
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=4950b35ad3df1e8a09d063907dad32a3@tipi-net.de \
--to=nb@tipi-net.de \
--cc=andrew@lunn.ch \
--cc=linux@armlinux.org.uk \
--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