From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: "Bjørn Mork" <bjorn@mork.no>
Cc: "Maxime Chevallier" <maxime.chevallier@bootlin.com>,
davem@davemloft.net, "Andrew Lunn" <andrew@lunn.ch>,
"Jakub Kicinski" <kuba@kernel.org>,
"Eric Dumazet" <edumazet@google.com>,
"Paolo Abeni" <pabeni@redhat.com>,
"Heiner Kallweit" <hkallweit1@gmail.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
thomas.petazzoni@bootlin.com,
"Florian Fainelli" <f.fainelli@gmail.com>,
"Köry Maincent" <kory.maincent@bootlin.com>,
"Simon Horman" <horms@kernel.org>,
"Romain Gantois" <romain.gantois@bootlin.com>,
"Antoine Tenart" <atenart@kernel.org>,
"Marek Behún" <kabel@kernel.org>
Subject: Re: [PATCH net-next 0/2] net: phy: sfp: Add single-byte SMBus SFP access
Date: Tue, 25 Feb 2025 18:40:02 +0000 [thread overview]
Message-ID: <Z74OgoixUyD5BLDs@shell.armlinux.org.uk> (raw)
In-Reply-To: <87h64hsxsi.fsf@miraculix.mork.no>
On Tue, Feb 25, 2025 at 07:07:41PM +0100, Bjørn Mork wrote:
> "Russell King (Oracle)" <linux@armlinux.org.uk> writes:
>
> >> I believe you are reading more into the spec than what's actually there.
> >
> > So I'm making up the quote above from SFF-8472. Okay, if that's where
> > this discussion is going, I'm done here.
>
> No, not at all. That was not what I meant. Please accept my apologies.
> This came out wrong. You are absolutely correct about reading the 16bit
> diagnostic registers you quoted. I would never doubt that. I have an
> extreme respect for you and your knowledge of these standards and the
> practical hardware implications.
>
> It was the conclusion that this fact prevents SMBus hosts I wanted to
> question. I still don't see that. Some SMBus hosts might be able do 2
> byte reads. And if they can't, then I believe they can safely ignore
> these registers without being out of spec. Like the proposed solution.
It doesn't prevent SMBus hosts, but it does prevent SMBus hosts from
being able to be used *reliably* with the diagnostics "EEPROM" to read
the values in a coherent manner.
It also prevents being able to identify the Nokia 3FE46541AA module,
because the module's I2C locks the bus when a single-byte read of
offset 0x51 in the "identity" EEPROM at 0xA0/0x50.
We do already have single-byte mode in the SFP driver, which is
necessary to work around the broken I2C interface on RTL8672 and
RTL9601C which emulate that EEPROM.
There's a lot of "brokenness" out there, and what I've learnt from
dealing with SFPs over the last 10+ years is to be cautious about
*everything*. One thing that can be guaranteed is that a module will
be broken in unexpected ways, and using a different behaviour for
working modules will turn out to break.
The Nokia 3FE46541AA is a brilliant example of a module that
emulates all accesses and fails with single-byte reads, thus making
it incompatible with a SMBus that can only read single bytes.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2025-02-25 18:40 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-23 17:28 [PATCH net-next 0/2] net: phy: sfp: Add single-byte SMBus SFP access Maxime Chevallier
2025-02-23 17:28 ` [PATCH net-next 1/2] net: phy: sfp: Add support for SMBus module access Maxime Chevallier
2025-02-23 17:28 ` [PATCH net-next 2/2] net: mdio: mdio-i2c: Add support for single-byte SMBus operations Maxime Chevallier
2025-02-24 3:36 ` Andrew Lunn
2025-02-24 10:03 ` Maxime Chevallier
2025-02-23 17:40 ` [PATCH net-next 0/2] net: phy: sfp: Add single-byte SMBus SFP access Russell King (Oracle)
2025-02-23 17:48 ` Maxime Chevallier
2025-02-25 12:38 ` Bjørn Mork
2025-02-25 13:06 ` Maxime Chevallier
2025-02-25 13:29 ` Andrew Lunn
2025-02-25 17:15 ` Russell King (Oracle)
2025-02-25 18:07 ` Bjørn Mork
2025-02-25 18:40 ` Russell King (Oracle) [this message]
2025-02-23 18:37 ` Bjørn Mork
2025-02-23 20:31 ` Russell King (Oracle)
2025-02-24 3:32 ` Andrew Lunn
2025-02-24 7:13 ` Bjørn Mork
2025-02-24 8:47 ` Russell King (Oracle)
2025-02-24 9:35 ` Maxime Chevallier
2025-02-24 13:31 ` Andrew Lunn
2025-02-24 13:48 ` Russell King (Oracle)
2025-02-24 14:18 ` Andrew Lunn
2025-02-24 14:32 ` Marek Behún
2025-02-24 14:38 ` Russell King (Oracle)
2025-02-24 16:24 ` Maxime Chevallier
2025-02-25 8:08 ` Maxime Chevallier
2025-02-24 9:38 ` Maxime Chevallier
2025-02-24 10:36 ` Marek Behún
2025-02-24 16:30 ` Sean Anderson
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=Z74OgoixUyD5BLDs@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=andrew@lunn.ch \
--cc=atenart@kernel.org \
--cc=bjorn@mork.no \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=horms@kernel.org \
--cc=kabel@kernel.org \
--cc=kory.maincent@bootlin.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maxime.chevallier@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=romain.gantois@bootlin.com \
--cc=thomas.petazzoni@bootlin.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).