mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Yibo Dong <dong100@mucse.com>
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org,
	kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	yaojun@mucse.com
Subject: Re: [PATCH net-next v2 2/5] net: rnpgbe: Report link settings through ethtool
Date: Tue, 17 Nov 2026 02:54:45 +0100	[thread overview]
Message-ID: <2ddca58c-608f-4a0f-a26d-df92c2c34c69@lunn.ch> (raw)
In-Reply-To: <236B4E2337BC768E+20261117014902.GA205295@nic-Precision-5820-Tower>

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:
> > > 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

  reply	other threads:[~2026-11-17  1:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-16  3:09 [PATCH net-next v2 0/5] net: rnpgbe: Add basic management and statistics Dong Yibo
2026-11-16  3:10 ` [PATCH net-next v2 1/5] net: rnpgbe: Add basic ethtool support Dong Yibo
2026-11-16  3:10 ` [PATCH net-next v2 2/5] net: rnpgbe: Report link settings through ethtool Dong Yibo
2026-11-16  4:19   ` Andrew Lunn
2026-11-16  4:47     ` Yibo Dong
2026-11-16 13:18       ` Andrew Lunn
2026-11-17  1:49         ` Yibo Dong
2026-11-17  1:54           ` Andrew Lunn [this message]
2026-11-16  3:10 ` [PATCH net-next v2 3/5] net: rnpgbe: Support copper link configuration Dong Yibo
2026-11-16  3:10 ` [PATCH net-next v2 4/5] net: rnpgbe: Allow changing the primary MAC address Dong Yibo
2026-11-16  3:10 ` [PATCH net-next v2 5/5] net: rnpgbe: Add hardware and queue statistics Dong Yibo

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=2ddca58c-608f-4a0f-a26d-df92c2c34c69@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dong100@mucse.com \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=yaojun@mucse.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

all inboxes | Powered by JetHome®