[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z0gksn9nEKJOY5Ul@pengutronix.de>
Date: Thu, 28 Nov 2024 09:07:14 +0100
From: Oleksij Rempel <o.rempel@...gutronix.de>
To: Andrew Lunn <andrew@...n.ch>
Cc: Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
kernel@...gutronix.de, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org
Subject: Re: [RFC net-next v1 2/2] net. phy: dp83tg720: Add randomized
polling intervals for unstable link detection
Hi Andrew,
On Wed, Nov 27, 2024 at 04:37:49PM +0100, Andrew Lunn wrote:
> On Wed, Nov 27, 2024 at 02:10:11PM +0100, Oleksij Rempel wrote:
> > Address the limitations of the DP83TG720 PHY, which cannot reliably detect or
> > report a stable link state. To handle this, the PHY must be periodically reset
> > when the link is down. However, synchronized reset intervals between the PHY
> > and its link partner can result in a deadlock, preventing the link from
> > re-establishing.
> >
> > This change introduces a randomized polling interval when the link is down to
> > desynchronize resets between link partners.
>
> Hi Oleksij
>
> What other solutions did you try? I'm wondering if this is more
> complex than it needs to be. Could you add a random delay in
> dp83tg720_read_status() when it decides to do a reset?
Yes, this would be possible, but there are multiple reasons I decided to
go this way:
- in link down case, it is better to increase polling frequency, it
allows to reduce link up time.
- there are PHYs, for example an integrated to LAN9372 which supports
only link down interrupt. As long as link is down, it should be
polled.
- i'm working on generic PHY stats support and PHYs need to be polled,
even with IRQ support, just less frequently.
I can add it to the commit message.
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Powered by blists - more mailing lists