[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e2e91c7e-c201-4fbc-9e5e-e967b6c52e8b@lunn.ch>
Date: Thu, 12 Jun 2025 17:34:55 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Oleksij Rempel <o.rempel@...gutronix.de>
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>,
David Jander <david@...tonic.nl>, kernel@...gutronix.de,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v2 3/3] net: phy: dp83tg720: switch to adaptive
polling and remove random delays
On Thu, Jun 12, 2025 at 12:41:57PM +0200, Oleksij Rempel wrote:
> From: David Jander <david@...tonic.nl>
>
> Now that the PHY reset logic includes a role-specific asymmetric delay
> to avoid synchronized reset deadlocks, the previously used randomized
> polling intervals are no longer necessary.
>
> This patch removes the get_random_u32_below()-based logic and introduces
> an adaptive polling strategy:
> - Fast polling for a short time after link-down
> - Slow polling if the link remains down
> - Slower polling when the link is up
>
> This balances CPU usage and responsiveness while avoiding reset
> collisions. Additionally, the driver still relies on polling for
> all link state changes, as interrupt support is not implemented,
> and link-up events are not reliably signaled by the PHY.
>
> The polling parameters are now documented in the updated top-of-file
> comment.
>
> Co-developed-by: Oleksij Rempel <o.rempel@...gutronix.de>
> Signed-off-by: David Jander <david@...tonic.nl>
> Signed-off-by: Oleksij Rempel <o.rempel@...gutronix.de>
Reviewed-by: Andrew Lunn <andrew@...n.ch>
Andrew
Powered by blists - more mailing lists