From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>,
Josua Mayer <josua@solid-run.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC net-next v2 1/2] net: phy: marvell: 88e1111: define gigabit features
Date: Mon, 19 Jan 2026 10:27:52 +0100 [thread overview]
Message-ID: <b8cafe50-c87b-4bd4-a47e-d11c11c16f7c@bootlin.com> (raw)
In-Reply-To: <aVe-SlqC0DfGS6O5@shell.armlinux.org.uk>
Hi Russell, Josua,
On 02/01/2026 13:47, Russell King (Oracle) wrote:
> If the operational mode of the PHY is reconfigured at runtime, then I
> think it would be reasonable to re-read the supported linkmodes.
> However, I think this will cause issues for phylink, as currently it
> wants to know the link modes that are supported so it can choose an
> appropriate interface mode.
Russell, I agree that your patches for phydev->supported_interfaces
are required, but I also think we need another piece of the puzzle to
solve Josua's issue.
From what I get, it's impossible from the PHY driver's perspective only,
to know which configuration the PHY is in, i.e. is it in :
1000X to 1000T
SGMII to 1000T
SGMII to something else ?
This is one of the issues I was facing with the SGMII to 100FX adapters.
Selecting the right phy_interface, is one thing, but it doesn't address
the fact that whe don't know which linkmodes to put in phydev->supported.
The approach I took to address that is in patch 3 of this series [1] :
- The SFP's eeprom should ideally store information about the MDI of the
module, is it outputing fiber at 1G, at 100M, is it BaseT, etc.
- in sfp_sm_probe_phy(), we have the sfp_module_caps fully parsed, with
fixups and quirks applied, so what I do is store a pointer to those in
struct phy_device
- The PHY driver can then use that in its .get_features() to report the
proper linkmodes.
Of course, this may not be the right approach. What do we trust more, the SFP
eeprom, or the PHY's reported linkmodes through features discovery ?
IMO relying on the SFP subsystem to build a proper list of linkmodes we can
achieve on the module is a bit better, as we have the opportunity to apply
fixups and quirks.
Maxime
[1] : https://lore.kernel.org/all/20260114225731.811993-1-maxime.chevallier@bootlin.com/#t
next prev parent reply other threads:[~2026-01-19 9:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-01 16:05 [PATCH RFC net-next v2 0/2] " Josua Mayer
2026-01-01 16:05 ` [PATCH RFC net-next v2 1/2] " Josua Mayer
2026-01-02 12:47 ` Russell King (Oracle)
2026-01-02 13:55 ` Russell King (Oracle)
2026-01-19 8:30 ` Josua Mayer
2026-01-19 10:52 ` Russell King (Oracle)
2026-01-19 9:27 ` Maxime Chevallier [this message]
2026-01-21 9:52 ` Josua Mayer
2026-01-21 15:06 ` Russell King (Oracle)
2026-01-22 12:31 ` Maxime Chevallier
2026-01-01 16:05 ` [PATCH RFC net-next v2 2/2] net: sfp: support 25G long-range modules (extended compliance code 0x3) Josua Mayer
2026-01-01 17:43 ` Andrew Lunn
2026-01-02 12:48 ` Russell King (Oracle)
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=b8cafe50-c87b-4bd4-a47e-d11c11c16f7c@bootlin.com \
--to=maxime.chevallier@bootlin.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=josua@solid-run.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®