lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aNqJS6sUp-lk2-xC@shell.armlinux.org.uk>
Date: Mon, 29 Sep 2025 14:27:39 +0100
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Janpieter Sollie <janpieter.sollie@...elmail.de>
Cc: Andrew Lunn <andrew@...n.ch>, Heiner Kallweit <hkallweit1@...il.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	netdev@...r.kernel.org,
	Marek Behún <kabel@...nel.org>
Subject: Re: [PATCH RFC] increase i2c_mii_poll timeout for very slow SFP
 modules

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!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ