From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796123057; b=FdMzuLTgPBl+n7h5Jz/4Nrc3BDQkOFAroDIQbbvv5No8sPPxrdLD3+iCoKKbbS20dsSu p/oNCf6X5twr/LvQC9NfPoCm0GdyS1Pu0j/FzcEevguUelNcLrmtblb0bcFkVM3VtAb1Z scRP7C+0BG81SDO4jrCeGUb3rV36Sh1dHDhEPaZTOY4E8wxeH8GpfFcqX0vICMZZArgS5 1Fi15XeJfIMMe+85q0u9i/z1lpXxYsUlgKYlRNnRvo6u5Irh/gO3J2sTYsA5Zm4AcywxN vK74vCD6Tc7/QHeuZn4fsCNnlUgX/4h6E9MEEazs7KDjbIK4mJGZAOKwgDreiGDFYow== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796123057; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=RBb5cnvpBvq/N01Xr45h69wA0kEGE9Nbis6AdsRWSVg=; b=eyWMl3zRw1fR3tgnjsZYusvxS7Hv/TmmiZyMJywgotijB5STh95u937EPR+WgmUPd6kK aYwYdhjf0CVJJGDA6D81JNxgH+WIGunY086vB8fMmTr5qL6X7kt88Atny74A0U87h+Bi0 SaIHQRdaHPJ5h8A0ERJH3/xsBtZrLXUs3vwjgl/G1Ius02Qea9iW3QSL4b6HYbtYVYUUi 0nfa/F5vB6wJrJbPAkdA/nuRQfF9I7wBuXx0M/hklV+Wuv1U2+ZXZnQQNieAas2Kxw1a6 DPmTCiwnQS9R4Q8r54GhvM/a9wk/TdnriBlZXvpPF/rZBvzhdZv8GGLFiY8m+NU1p4Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=CSlKmNko; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EAA93606A31A; Tue, 1 Dec 2026 11:04:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=CSlKmNko Received: by smtp.kernel.org (Postfix) with ESMTPSA id 591041F00893; Tue, 1 Dec 2026 11:04:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796123056; bh=RBb5cnvpBvq/N01Xr45h69wA0kEGE9Nbis6AdsRWSVg=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=CSlKmNkozwKnV08AzbGqRpFAxnCSyD/hFDduG8phGfqXgQOc7AxjtPJqNQQ7SRQI0 xVwItB/W2ne0f35Sd3+YjSlJQxqd0pLTefs4YejdGIyQ9XmAGmXGJ58okmE9LYMgus tIkGwaFOkAjrO8I/lZ2OQhxvBFRAe/b3tWIsjf1UrhCNq5ey0vCEaUUXeXC7TOAcu+ UsqT3Qjn6053+6ua63AW82Yjsg5GbtiXEDIC2IZZ0m8bS6PxwZWcQDkRY558an1PCD Z2Vkcq7BfbT8RRAjW+x13ZtuS6h14/S/l/k6oTW+sSS9Ii/ERMr2Oho/X8iO58xqfS yPxB4yTw1ltfg== Date: Tue, 1 Dec 2026 11:04:11 +0000 From: Simon Horman To: Florian Fainelli Cc: netdev@vger.kernel.org, Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Heiner Kallweit , Russell King , Jijie Shao , Runyu Xiao , David Yang , Herbert Valerio Riedel , Danny Kukawka , Mugunthan V N , Sebastian Hesselbarth , open list , Manuel Lauss Subject: Re: [PATCH net v4 08/10] net: phy: smsc: wait for LAN83C183 power-down recovery Message-ID: <20261201110411.GV804035@horms.kernel.org> References: <20261121004809.1690280-1-f.fainelli@gmail.com> <20261121004809.1690280-9-f.fainelli@gmail.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261121004809.1690280-9-f.fainelli@gmail.com> On Fri, Nov 20, 2026 at 04:48:07PM -0800, Florian Fainelli wrote: > The LAN83C183 uses the generic PHY driver, which returns immediately > after clearing BMCR_PDOWN. Section 1.11 of the datasheet allows 500 ms > before normal operation is restored. Starting the Au1000 MAC before the > MII clocks recover can hang the MTX-1 when reopening its interface. > > Add a LAN83C183 driver entry and resume callback. Wait for recovery only > when BMCR_PDOWN was actually cleared, and propagate MDIO errors without > waiting. Resuming an already awake PHY does not incur the delay. > > This supplies the PHY recovery delay; it does not by itself fix the > Au1000 MAC/PHY ordering on reopen. The companion patch, "net: au1000: > keep the MAC stopped until the PHY link is ready", resumes the PHY > synchronously before MAC initialization and stops the MAC before PHY > suspend. Both changes are needed to address the MTX-1 reopen hang. > Keep this PHY change first so the recovery delay is available when the > MAC sequencing fix is applied. > > The specific PHY driver must be bound before the MAC attaches the PHY. > For a built-in au1000 MAC used during early boot, enable CONFIG_SMSC_PHY=y. > Module configurations must arrange for smsc.ko to be loaded before PHY > attachment. If attachment falls back to genphy, loading smsc.ko later > does not replace that binding and the recovery delay will not run. > MTX-1 validation used CONFIG_MIPS_AU1X00_ENET=y and CONFIG_SMSC_PHY=y; > the boot logs confirmed attachment to the SMSC LAN83C183 driver. > > The LAN83C183 and LSI L80227 document the same LSI/SEEQ OUI and model 4, > so this ID match also binds the L80227 and applies the same conservative > 500 ms delay when clearing power-down. The entry otherwise uses generic > PHY helpers and does not program SMSC-specific registers. Hardware > validation is limited to the LAN83C183; the L80227 was not tested. > > Sashiko AI review identified the dependency, binding prerequisite and > shared PHY ID. > > Fixes: be9dad1f9f26 ("net: phy: suspend phydev when going to HALTED") > Link: https://pdf.dzsc.com/LAN/LAN83C183.pdf#page=44 > Link: https://datasheet.octopart.com/L80223-LSI-datasheet-11757091.pdf#page=73 > Signed-off-by: Florian Fainelli Reviewed-by: Simon Horman