From: Nicolai Buchwitz <nb@tipi-net.de>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Thangaraj Samynathan <thangaraj.s@microchip.com>,
netdev@vger.kernel.org, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, bryan.whitehead@microchip.com,
UNGLinuxDriver@microchip.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v2 2/2] net: lan743x: add support for RMII interface
Date: Wed, 27 May 2026 12:11:36 +0200 [thread overview]
Message-ID: <10b311c5feef2ab18f1e94a6c935a79b@tipi-net.de> (raw)
In-Reply-To: <b24c34f91726681ef5797af10b3d1e9a@tipi-net.de>
Hi Andrew
On 26.5.2026 21:59, Nicolai Buchwitz wrote:
> [...]
>>
>> Humm, is this an 802.3 limitation, or a limitation of this hardware?
>
> I do not think this is specific to the lan743x. Linux drives EEE from
> the MAC side, so mac_enable_tx_lpi() has to signal "assert LPI" to the
> PHY across the xMII. On MII and GMII the MAC signals LPI using TX_ER,
> and AFAICT RMII has a reduced pin set with no TX_ER, so the MAC has no
> standard way to request LPI over RMII. So IMHO EEE does not really
> apply to RMII in general, not only on this controller. Please correct
> me if I am missing something here.
> [...]
>> If this is 802.3, then this should be in phylink, not drivers.
>
> Since this seems generic, I agree it belongs in phylink rather than
> each driver. I can send a patch excluding RMII (and probably REVRMII)
> from EEE centrally, so drivers do not need to special-case it.
I looked into this some more and I don't think it belongs in phylink
after all.
The "no TX_ER, no in-band LPI" bit is generic and holds for any
MAC-driven EEE over RMII (IEEE 802.3 22.2.2 / Table 22-1: LPI is
asserted via TX_ER, which RMII doesn't have). But EEE still works over
RMII when the PHY or switch does LPI autonomously (PHY-managed EEE...
yikes), since that needs no in-band signaling.
ksz_common is exactly that: it puts RMII in lpi_interfaces on purpose
and uses a dummy mac_enable_tx_lpi() (the comment there explains the HW
handles LPI itself once EEE is negotiated):
/* ksz_phylink_mac_enable_tx_lpi() - Callback to signal LPI support
(Dummy)
* [...]
* the actual EEE / Low Power Idle (LPI) state transitions are managed
* autonomously by the hardware based on the auto-negotiation results.
* [...]
* Therefore, this callback performs no action and serves primarily to
* inform phylink of LPI awareness [...]
*/
int ksz_phylink_mac_enable_tx_lpi(struct phylink_config *config,
u32 timer, bool tx_clock_stop)
{
return 0;
}
So clearing RMII in phylink would break EEE there.
lpi_interfaces is opt-in already, RMII is only affected when a driver
memcpy()s supported_interfaces into it. So it seems that this is really
per-driver, and keeping the exclusion in lan743x looks right to me.
Unless we want to continue handling EEE differently depending on if MAC
or PHY-managed EEE ...
> [...]
Nicolai
next prev parent reply other threads:[~2026-05-27 10:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-26 15:40 [PATCH net-next v2 0/2] net: lan743x: add RMII support for PCI11x1x Thangaraj Samynathan
2026-05-26 15:40 ` [PATCH net-next v2 1/2] net: lan743x: add RMII strap status detection " Thangaraj Samynathan
2026-05-26 16:40 ` Andrew Lunn
2026-05-27 3:21 ` Thangaraj.S
2026-05-27 12:12 ` Andrew Lunn
2026-05-26 15:40 ` [PATCH net-next v2 2/2] net: lan743x: add support for RMII interface Thangaraj Samynathan
2026-05-26 16:49 ` Andrew Lunn
2026-05-26 19:59 ` Nicolai Buchwitz
2026-05-27 10:11 ` Nicolai Buchwitz [this message]
2026-05-27 12:20 ` Andrew Lunn
2026-05-27 12:38 ` Nicolai Buchwitz
2026-05-27 3:23 ` Thangaraj.S
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=10b311c5feef2ab18f1e94a6c935a79b@tipi-net.de \
--to=nb@tipi-net.de \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=bryan.whitehead@microchip.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=thangaraj.s@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
Powered by JetHome