Netdev List
 help / color / mirror / Atom feed
From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Andrew Lunn <andrew@lunn.ch>
Cc: "Linus Walleij" <linusw@kernel.org>,
	"Luiz Angelo Daros de Luca" <luizluca@gmail.com>,
	"Vladimir Oltean" <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	kernel@pengutronix.de, linux-kernel@vger.kernel.org,
	"Ahmad Fatoum" <a.fatoum@pengutronix.de>,
	"Alvin Šipraga" <alvin.sipraga@analog.com>,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next v1 2/2] net: dsa: realtek: rtl8365mb: add EEE support
Date: Tue, 18 Aug 2026 14:22:29 +0200	[thread overview]
Message-ID: <aoROhXF2XJabMMM8@pengutronix.de> (raw)
In-Reply-To: <8be5a31d-55af-47ba-bd7b-4e581c3950bd@lunn.ch>

On Mon, Aug 17, 2026 at 04:53:52PM +0200, Andrew Lunn wrote:
> > +static int rtl8365mb_phylink_mac_enable_tx_lpi(struct phylink_config *config,
> > +					       u32 timer, bool tx_clock_stop)
> > +{
> > +	/* The hardware manages LPI itself; there is no MAC-level LPI control.
> > +	 * This callback only signals LPI awareness to phylink.
> > +	 */
> > +	return 0;
> > +}
> > +
> > +static void rtl8365mb_phylink_mac_disable_tx_lpi(struct phylink_config *config)
> > +{
> > +}
> > +
> 
> So what happens when i do:
> 
> ethtool --set-eee eth42 off
> 
> or
> 
> ethtool --set-eee eth42 tx-lpi on

In current implementation, with "tx-lpi off", the driver will return
-EINVAL, "tx-lpi on" will be passed. It is aligned with KSZ driver.
rtl8365mb_set_mac_eee() is used as filter.

> I don't now what phylib does with advertise in these cases, but maybe
> you need to go behind phylink/phylib back and set advertise to 0, so
> that the MAC does the right thing?

If I see it correctly, We wont be able to emulate "eee on tx-lpi off"
case on this HW. On proper HW, this configuration will be link speed
dependent:

- 100 Mbit/s - TX line will be active, RX can be idle if link partner is
  in LPI.

- 1000 Mbit/s - this configuration will make EEE/LPI non functional, almost
  equal to "eee off" (EEE is advertised but not activated)

I decided not to emulate "tx-lpi off" by disabling EEE advertisement.

> Or you need to return -EOPNOTSUPP for these?

Currently it is -EINVAL as in KSZ driver. If we will go with -EOPNOTSUPP
then probably both drivers should follow it.

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2026-08-18 12:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-17 13:47 [PATCH net-next v1 0/2] net: dsa: realtek: EEE support for RTL8365MB-VC Oleksij Rempel
2026-08-17 13:47 ` [PATCH net-next v1 1/2] net: phy: realtek: use C45 for RTL8365MB-VC internal PHY MMD access Oleksij Rempel
2026-08-17 14:44   ` Andrew Lunn
2026-08-17 13:47 ` [PATCH net-next v1 2/2] net: dsa: realtek: rtl8365mb: add EEE support Oleksij Rempel
2026-08-17 14:53   ` Andrew Lunn
2026-08-18 12:22     ` Oleksij Rempel [this message]
2026-08-18 13:10       ` Andrew Lunn
2026-08-17 13:51 ` [PATCH net-next v1 0/2] net: dsa: realtek: EEE support for RTL8365MB-VC Oleksij Rempel

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=aoROhXF2XJabMMM8@pengutronix.de \
    --to=o.rempel@pengutronix.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=alvin.sipraga@analog.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luizluca@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.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