From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Janpieter Sollie <janpieter.sollie@kabelmail.de>
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, "Marek Behún" <kabel@kernel.org>
Subject: Re: [PATCH RFC] increase i2c_mii_poll timeout for very slow SFP modules
Date: Mon, 29 Sep 2025 14:27:39 +0100 [thread overview]
Message-ID: <aNqJS6sUp-lk2-xC@shell.armlinux.org.uk> (raw)
In-Reply-To: <d73c74c0-5832-4358-a18e-1f555e928e79@kabelmail.de>
On Mon, Sep 29, 2025 at 01:44:24PM +0200, Janpieter Sollie wrote:
> originally developed by Marek,
> commit 09bbedac72d5a9267088c15d1a71c8c3a8fb47e7
>
> while most SFP cages do function properly in i2c_rollball_mii_poll(),
> SFP+ modules from no-name vendors seem to behave slowly.
> This gets even worse on embedded devices,
> where power constraints are in place.
> i2c_rollball_mii_poll() could timeout here.
>
> dynamically increase waiting time, so the phy gets more time to finish the job.
> It it beyond my knowledge how much the target gets interrupted by a poll() call.
>
> A better method might be to add a kconfig option "allow very slow SFP MDIO",
> so strict timeout errors can be detected where useful,
> and be avoided when the kernel is built to work on embedded devices.
>
> Janpieter Sollie
>
> --- a/drivers/net/mdio/mdio-i2c.c 2025-09-19 16:35:52.000000000 +0200
> +++ b/drivers/net/mdio/mdio-i2c.c 2025-09-27 14:11:59.406323627 +0200
> @@ -248,12 +248,15 @@ static int i2c_rollball_mii_poll(struct mii_bus *bus, int bus_addr, u8 *buf,
> msgs[1].len = len;
> msgs[1].buf = res;
>
> - /* By experiment it takes up to 70 ms to access a register for these
> - * SFPs. Sleep 20ms between iterations and try 10 times.
> + /* By experiment it takes up to 70 ms
> + * to access a register for normal SFPs.
> + * Sleep at least 20ms between iterations and try 10 times.
> + * Slower modules on embedded devices may need more.
Your persistent attempts to differentiate between the platforms that
this code was developed on (allegedly, according to you, "high
performance") and your "embedded devices" is becoming very very
wearing.
Please come back when you've changed your attitude.
Thanks.
--
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-29 13:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-29 11:44 [PATCH RFC] increase i2c_mii_poll timeout for very slow SFP modules Janpieter Sollie
2025-09-29 13:27 ` Russell King (Oracle) [this message]
2025-09-30 12:41 ` 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=aNqJS6sUp-lk2-xC@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=kabel@kernel.org \
--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).