netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fabio Baltieri <fabio.baltieri@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
	nic_swsd@realtek.com, Andrew Lunn <andrew+netdev@lunn.ch>,
	"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] r8169: add support for RTL8127ATF
Date: Tue, 18 Nov 2025 11:08:03 +0000	[thread overview]
Message-ID: <aRxTk9wuRiH-9X6l@google.com> (raw)
In-Reply-To: <c6beb0d4-f65e-4181-80e6-212b0a938a15@lunn.ch>

On Mon, Nov 17, 2025 at 08:37:41PM +0100, Andrew Lunn wrote:
> > +	if (tp->fiber_mode) {
> > +		phy_remove_link_mode(tp->phydev, ETHTOOL_LINK_MODE_10baseT_Half_BIT);
> > +		phy_remove_link_mode(tp->phydev, ETHTOOL_LINK_MODE_10baseT_Full_BIT);
> > +		phy_remove_link_mode(tp->phydev, ETHTOOL_LINK_MODE_100baseT_Half_BIT);
> > +		phy_remove_link_mode(tp->phydev, ETHTOOL_LINK_MODE_100baseT_Full_BIT);
> > +		phy_remove_link_mode(tp->phydev, ETHTOOL_LINK_MODE_2500baseT_Full_BIT);
> > +		phy_remove_link_mode(tp->phydev, ETHTOOL_LINK_MODE_5000baseT_Full_BIT);
> 
> An SFP module can support baseT modes, if the SFP module has a PHY
> inside it. But it could also be it is a fibre module with a laser and
> so uses 100baseFX, 1000baseX, 2500BaseX, etc.

Right, so for an SFP NIC would you expect ethtool to report only the
modes supported by the module? It'd make sense, like right now I'm
testing with a 10GBASE-SR module but as it stands ethtool will always
only show 1000baseT and 10000baseT.

> To do this properly, you need to be able to read the SFP EERPOMs
> content, to know what sort of SFP module you have plugged in. Then you
> can list the correct modes.

I see, unfortunately all I have for this NIC is the out of tree Realtek
driver and it does not seem to implement the API for reading the module
EEPROM data, and there's no datasheet available, so I'm afraid that
either the Realtek folks pick this up or it's not going to happen.

In the current state the driver matches the behavior of the out of tree
one, which is to only report 1000baseT and 10000baseT as supported,
which I guess is a good hint that that's what the user can set the card
manually at. Are you suggesting that I should change this to do
something different?

-- 
Fabio

  reply	other threads:[~2025-11-18 11:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-17 19:16 [PATCH] r8169: add support for RTL8127ATF Fabio Baltieri
2025-11-17 19:37 ` Andrew Lunn
2025-11-18 11:08   ` Fabio Baltieri [this message]
2025-11-18 19:31     ` Andrew Lunn
2025-11-18 20:02       ` Heiner Kallweit
2025-11-18 20:20         ` Fabio Baltieri
2025-11-18 21:31           ` Michael Zimmermann
2025-11-18 22:01             ` Fabio Baltieri
2025-11-19  7:00               ` Michael Zimmermann
2025-11-19 10:26                 ` Fabio Baltieri
2025-11-20 23:17                   ` Heiner Kallweit
2025-11-21 12:09                     ` Fabio Baltieri
2025-11-21 13:09                       ` Heiner Kallweit

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=aRxTk9wuRiH-9X6l@google.com \
    --to=fabio.baltieri@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nic_swsd@realtek.com \
    --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;
as well as URLs for NNTP newsgroup(s).