From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Janpieter Sollie <janpieter.sollie@kabelmail.de>
Cc: Andrew Lunn <andrew@lunn.ch>,
netdev@vger.kernel.org, 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>
Subject: Re: [RFC] increase MDIO i2c poll timeout gradually (including patch)
Date: Mon, 22 Sep 2025 16:25:20 +0100 [thread overview]
Message-ID: <aNFqYPLP2igudMq2@shell.armlinux.org.uk> (raw)
In-Reply-To: <6ea48bbb-972e-41f7-8c73-5ddffd9d0384@kabelmail.de>
On Mon, Sep 22, 2025 at 04:30:56PM +0200, Janpieter Sollie wrote:
> Based on my mails, I can certainly see why you're thinking this way.
> I have no idea what goes wrong anywhere between me making a modification in
> the mdio.c file -> i2c code -> ... -> SFP phy.
> I'm curious what goes wrong, notice the 3 dots in between,
> I know there's a pca9545 muxer in in there further complicating it, but that's about it.
>
> Long story short: should I somehow try to test the reliability of something else?
What you have in these setups is:
1. The I2C bus from the host to the SFP module pins. On the SFP module
is an EEPROM at address 0x50 which contains some useful, some not so
useful identification of the module.
2. Sometimes there is a PHY at 0x56, which is normally a Marvell
88E1111 which was designed for use on SFPs, and has not only the
conventional MDIO bus connectivity, but also supports I2C as well.
3. Some baseT modules, the PHY is not accessible.
4. Others have a microcontroller on them - so far identified some with
an Arm Cortex-M controller, but others have an 8051-based controller
to implement the "Rollball" protocol.
So, in the case of Rollball protocol modules, one is at the mercy of
the microcontroller receiving the I2C transactions, then accessing the
PHY over MDIO, and then responding appropriately. Given that there are
two different microcontrollers used for this task, I wouldn't be
surprised if there were numerous different firmwares running on them
of varying quality and efficiency.
I would suggest your module is taking excessively long to respond for
_some_ accesses. Maybe the controller isn't merely converting the
Rollball protocol to MDIO, but is doing other PHY manipulation as well,
e.g. emulating some functionality.
It may be interesting to work out whether it is a specific register or
set of registers that need longer access, and augment our knowledge
about what is going on with this stuff.
Ultimately yes, we likely have no option but to increase the timeout,
and to do that I suggest simply increasing the number of loops -
having the approx. 20ms delay between each attempt doesn't stress
anything.
--
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-09-22 15:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-19 13:52 [RFC] increase MDIO i2c poll timeout gradually (including patch) Janpieter Sollie
2025-09-19 17:04 ` Andrew Lunn
2025-09-20 10:00 ` Janpieter Sollie
2025-09-20 11:18 ` Russell King (Oracle)
2025-09-20 12:34 ` Janpieter Sollie
[not found] ` <6d444507-1c97-4904-8edb-e8cc1aa4399e@kabelmail.de>
2025-09-20 13:53 ` Russell King (Oracle)
2025-09-22 8:04 ` Janpieter Sollie
2025-09-22 10:54 ` Janpieter Sollie
2025-09-22 12:38 ` Russell King (Oracle)
2025-09-22 13:16 ` Russell King (Oracle)
2025-09-22 13:50 ` Russell King (Oracle)
2025-09-22 14:30 ` Janpieter Sollie
2025-09-22 15:25 ` Russell King (Oracle) [this message]
2025-09-23 7:02 ` Janpieter Sollie
2025-09-22 14:46 ` Janpieter Sollie
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=aNFqYPLP2igudMq2@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=janpieter.sollie@kabelmail.de \
--cc=kuba@kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).