Re: [PATCH net-next v2 2/5] net: rnpgbe: Report link settings through ethtool

From
Andrew Lunn <andrew@lunn.ch>
Date
2026-11-17 01:54:53
Also in
lkml
Reply to
Yibo Dong, 2026-11-17
On Tue, Nov 17, 2026 at 09:49:02AM +0800, Yibo Dong wrote:
On Mon, Nov 16, 2026 at 02:18:28PM +0100, Andrew Lunn wrote:
quoted
quoted
link, speed, duplex and mdix are updated asynchronously by
the mailbox event handler, outside RTNL. link_lock protects these updates
and provides a consistent snapshot in the getter.
O.K, thanks for the explanation.

I removed too much context, so i cannot see here. What about
lp_advertising? That also comes from the firmware, reported on link up
when autoneg completes.
The firmware manages autonegotiation and reports the negotiated speed
and duplex through mailbox link events. However, the current mailbox
interface does not expose the link partner's advertisement bitmap.

Therefore, lp_advertising is currently left zero to indicate that this
information is unknown to the driver.

If reporting lp_advertising is must, we would need to add a new
firmware mailbox command to retrieve the link partner's advertisement,
or add lp_advertising to link-event mbx alongwith link, speed and
duplex.
It is not a must, but it is useful.

Or you can just throw away your firmware, expose the MDIO bus, and let
phylink drive the hardware. Less code, less bugs, more functionality
for free.

	Andrew
Thread (17 messages) 17 messages, 3 authors, last reply 2d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help