From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D41742BEC34; Thu, 12 Jun 2025 15:35:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749742506; cv=none; b=kPPLvBUduug+DQBzJXMSY5QZAIRYNhFiX4djksplRQZiieJ+BbHty/3Ci5i0ydjYYXDj5ZwUcFXsz0NKNNdR+V8VT7xCYGl4WUS2ttpWYZssCTyVvVyTsOC5RH7bjU8lT4YVjRyKgSYDfPntvhZGowB9spmArwnUeCQSN2Vobvo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749742506; c=relaxed/simple; bh=oR30sMB3apJLZroHpS5Z433ClkjUIogihHlAImD2zDI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CyJlQBY9Ts7nv+hEnl16omCVIDjJmD8VGb2sHWjGVUqgZgFYDuB1EAl6rDI4xX8UI6e4KOk5pVmF/A8cs9R8ByDIF1HE6FpSGehg8LTWsCTintS7+HOECqZNOPMq0u91Ei9pi6cRk7bZH0HZu47B18peewQijM6tVL7N4nYDF5E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=TlKf7MXF; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="TlKf7MXF" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=14HKFxr1P9LFfEJfHXTUwEKl/fFHkZOWWgIfViNx+dE=; b=TlKf7MXFyCZ1/8tD3RwLc0sjFJ ODIdJLeuQZAsFh46Zcly9ukIXre0EO14RWpTz42tEct9/otLDVBw7dKa6L+HttQr5+aob0iNwz8Ar pVT/aFEgY7B2+ttH+2qAx83pRq1b0TSgBd+78zGJTQCa4CWzxkZzB0szRaI55p3rwGUE=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1uPjx9-00FYpp-3b; Thu, 12 Jun 2025 17:34:55 +0200 Date: Thu, 12 Jun 2025 17:34:55 +0200 From: Andrew Lunn To: Oleksij Rempel Cc: Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , David Jander , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH net-next v2 3/3] net: phy: dp83tg720: switch to adaptive polling and remove random delays Message-ID: References: <20250612104157.2262058-1-o.rempel@pengutronix.de> <20250612104157.2262058-4-o.rempel@pengutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250612104157.2262058-4-o.rempel@pengutronix.de> On Thu, Jun 12, 2025 at 12:41:57PM +0200, Oleksij Rempel wrote: > From: David Jander > > 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 > Signed-off-by: David Jander > Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Andrew