From: Thilo Zirnstein <thi.zirnstein@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: linux@armlinux.org.uk, hkallweit1@gmail.com, davem@davemloft.net,
edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v1 1/1] net: phylink: keep initial advertising settings
Date: Fri, 6 Nov 2026 22:21:30 +0100 [thread overview]
Message-ID: <au5E2qilAsVuUOgx@thi-server.fritz.box> (raw)
In-Reply-To: <fb28453b-9df6-49a1-8c01-543e7bfceeab@lunn.ch>
Hi Andrew,
Thanks for your feedback,
On Fri, Nov 06, 2026 at 02:51:18PM +0100, Andrew Lunn wrote:
...
> > The mode of action is as follows:
> >
> > * The link was not up yet - no phy connected
> > * the user configures the advertisement of the interface
> > * the mac driver delegates the call to phylink_ethtool_ksettings_set
> > * here we are not configuring the phy - it does not exist yet
>
> If it does not exist, it is not possible to validate the user request
> is actually supported by the PHY.
I think my description was a bit misleading.
The mode of action describes how the phy is attached by some
net driver and what the program flow is and why there is a problem.
Typically the device driver does not set/clear any advertisment bits
during device bring up. As least what I have seen so far.
It attaches the phy and brings up the link.
>
> > * the user set up the interface
> > * the mac drivers calls phylink_connect_phy
>
> At this point, is the previously configured value sanitised by what
> the PHY can actually do?
>
> Take the example of a MAC which can do up to 2500BaseX, but it is
> connected to a PHY which only supports SGMII. Before up, the user
> could request 2.5GBaseT, but at admin up that needs to be reduced down
> to 1G.
Good example, with this patch applied this will advertise 1G,
if the user does not configure exclusive 2.5G prior attaching the phy.
If the user configures exclusive 2.5G (2.5G only) the advertisment is empty.
I think this is fine because the user missconfigured the link, but maybe
i am to restrictive.
I wrote a little table for a better overview. I am not 100% sure
how your example behaves because 2.5G uses another interface then SGMII.
I have tested with a sgmii 1G half/full duplex link.
Without patch
without phy (user): phy caps link up advertisement
1G FD+HD 1G FD+HD 1G FD+HD
1G FD 1G FD+HD 1G FD+HD <= bad
1G FD+HD 1G FD 1G FD
With patch
without phy (user): phy caps link up advertisement
1G FD+HD 1G FD+HD 1G FD+HD
1G FD 1G FD+HD 1G FD <= good
1G FD+HD 1G FD 1G FD
> Andrew
Thilo
prev parent reply other threads:[~2026-11-06 21:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 12:55 Thilo Zirnstein
2026-11-06 13:51 ` Andrew Lunn
2026-11-06 21:21 ` Thilo Zirnstein [this message]
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=au5E2qilAsVuUOgx@thi-server.fritz.box \
--to=thi.zirnstein@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--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
all inboxes | Powered by JetHome®