Netdev List
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Conor Dooley <conor@kernel.org>
Cc: netdev@vger.kernel.org,
	Steve Wilkins <steve.wilkins@raymarine.com>,
	Conor Dooley <conor.dooley@microchip.com>,
	valentina.fernandezalanis@microchip.com,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	Claudiu Beznea <claudiu.beznea@tuxon.dev>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Russell King <linux@armlinux.org.uk>,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC net-next] net: macb: add support for configuring eee via ethtool
Date: Tue, 27 Aug 2024 17:29:28 +0200	[thread overview]
Message-ID: <3c5a3db5-a598-454e-807a-b5106008aa40@lunn.ch> (raw)
In-Reply-To: <20240827-excuse-banister-30136f43ef50@spud>

On Tue, Aug 27, 2024 at 12:29:23PM +0100, Conor Dooley wrote:
> From: Steve Wilkins <steve.wilkins@raymarine.com>
> 
> Add ethtool_ops for configuring Energy Efficient Ethernet in the PHY.
> 
> Signed-off-by: Steve Wilkins <steve.wilkins@raymarine.com>
> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
> ---
> Steve sent me this patch (modulo the eee -> keee change), but I know
> nothing about the macb driver, so I asked Nicolas whether the patch
> made sense. His response was:
> > Interesting although I have the feeling that some support from our MAC
> > is missing for pretending to support the feature.
> > I'm not sure the phylink without the MAC support is valid.
> >
> > I think we need a real task to be spawn to support EEE / LPI on cadence
> > driver (but I don't see it scheduled in a way or another 🙁 ).
> 
> Since he was not sure, next port of call is lkml.. Is this patch
> sufficient in isolation, or are additional changes required to the driver
> for it?
> 
> The other drivers that I looked at that use phylink_ethtool_set_eee()
> vary between doing what's done here and just forwarding the call, but
> others are more complex, so without an understanding of the subsystem
> I cannot tell :)
> 
> Alternatively, Steve, shout if you can tell me why forwarding to the phy
> is sufficient, and I'll update the commit message and send this as
> non-RFC.

This is not sufficient. EEE is negotiated with the link peer, so
phylib/phylink is involved so that negotiation is performed, and the
results reported back to the MAC.

The MAC then needs to act on the results of the negotiation. The MAC
does most of the work. It keeps a timer of when it last sent a
packet. If this time exceeds 'tx-timer', it signals to the PHY it can
swap into low power mode, because there is nothing to send. When the
next packet comes along, it needs to signal the PHY to transition back
into full power mode, and it needs to wait a little for that to
happen.

You are missing the MAC parts.

	Andrew

  reply	other threads:[~2024-08-27 15:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-27 11:29 [RFC net-next] net: macb: add support for configuring eee via ethtool Conor Dooley
2024-08-27 15:29 ` Andrew Lunn [this message]
     [not found]   ` <AM0PR04MB41316B50F68C83A73E57A82F89952@AM0PR04MB4131.eurprd04.prod.outlook.com>
2024-08-28 16:18     ` Andrew Lunn
2024-08-28 17:00       ` Wilkins, Stephen

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=3c5a3db5-a598-454e-807a-b5106008aa40@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=conor.dooley@microchip.com \
    --cc=conor@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.ferre@microchip.com \
    --cc=pabeni@redhat.com \
    --cc=steve.wilkins@raymarine.com \
    --cc=valentina.fernandezalanis@microchip.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