From: Andrew Lunn <andrew@lunn.ch>
To: Ayoub Kaanich <ayoub.kaanich@technica-engineering.de>
Cc: Russell King <linux@armlinux.org.uk>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: RFC: symmetric SET_MODULE_EEPROM_BY_PAGE with i2c_address for non-SFF pages
Date: Wed, 15 Jul 2026 15:05:21 +0200 [thread overview]
Message-ID: <cd58995a-6bcf-4283-a072-84651a4f0031@lunn.ch> (raw)
In-Reply-To: <AS4PR08MB8021E0A64800F977B6887141B7F82@AS4PR08MB8021.eurprd08.prod.outlook.com>
On Wed, Jul 15, 2026 at 08:09:56AM +0000, Ayoub Kaanich wrote:
> Hi,
>
> > In general, we are trying to block user space drivers, by only allowing read.
>
> So in principle, a write from a third party driver (not the NIC own driver) is allowed?
We would expect the code to fit in with the current architecture. So
mdio-i2c would provide a Linux MDIO bus. You "third party driver"
would be a PHY driver.
> Our issue is that the NIC drivers (especially the netlink based
> drivers), have no standard way to expose the I2C bus of the SFP
> module to other drivers. phylink based drivers don't have this
> issue.
>
> The current hierarchy is
>
> net_device => sfp_bus (missing in many drivers) => sfp (internal) => i2c_adapter
>
> For example: ice driver does not create an i2c_adapter or sfp_bus, even though many of the NICs using that driver have SFP28 or QSFP28 pluggable cages.
So Linux Ethernet drivers fall into two classes. Those where Linux
driver the hardware, making use of phylink/phylib, and those where
firmware drive the hardware, eg ice, and pretty much all intel
hardware, and most NICs which support > 10G.
For NICs using firmware, you will need to talk to each vendor, and ask
them to extend their firmware to support your SFP.
For NICs where Linux drives the hardware, which is pretty much all
NICs used in embedded systems, with a bandwidth up to 1G, and some
10G, provide an implementation of the protocol in mdio-i2c, and a PHY
driver, and it should all just work.
Looking at the other devices you pointed to, one used a Marvell
88q2xxx, for which a Linux driver already exists. And there was
sufficient hints in the document to make writing the I2C protocol
possible. The other device explicitly described the I2C protocol, but
did not mention what PHY was used, so might need a PHY driver. But
there are not too many T1 PHYs, so it might have a driver already.
Andrew
next prev parent reply other threads:[~2026-07-15 13:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-13 10:29 RFC: symmetric SET_MODULE_EEPROM_BY_PAGE with i2c_address for non-SFF pages Ayoub Kaanich
2026-07-14 19:55 ` Andrew Lunn
2026-07-15 8:09 ` Ayoub Kaanich
2026-07-15 13:05 ` Andrew Lunn [this message]
2026-07-15 13:41 ` Ayoub Kaanich
2026-07-15 14:49 ` Andrew Lunn
2026-07-15 15:20 ` Ayoub Kaanich
2026-07-15 15:58 ` Andrew Lunn
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=cd58995a-6bcf-4283-a072-84651a4f0031@lunn.ch \
--to=andrew@lunn.ch \
--cc=ayoub.kaanich@technica-engineering.de \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
/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).