🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #6807

Re: [PATCH net v3 1/2] net: bcmgenet: recover from a failed resume

#6807
From: Nicolai Buchwitz
Date: Fri, 23 Oct 2026 12:04
67 lines
10795 bytes
On 23.10.2026 13:55, netdev-bot+sashiko@kernel.org wrote:
> [...]

> [Severity: Medium]
> 
> After a failed non-WoL resume, can the next non-WoL suspend leave an
> external PHY powered up with its link active?
> 
> On the normal non-WoL path, bcmgenet_suspend() halts and suspends the
> PHY:
> 
> bcmgenet_netif_stop(dev, true)
>   phy_stop()
>     PHY_HALTED -> phy_suspend()   (BMCR power-down)
> 
> The failed resume has already done this before bcmgenet_init_dma()
> fails:
> 
> bcmgenet_resume()
>   phy_init_hw()          drv->soft_reset() clears BMCR_PDOWN and sets
>                          phydev->suspended = 0
>   genphy_config_aneg()   restarts autoneg
>   bcmgenet_init_dma()    fails -> return ret
>                          (phy_resume() is never reached)
> 
> This new early return then skips any PHY power-down. Calling phy_stop()
> here would not work either, because the PHY is still in PHY_HALTED.
> 
> Nothing else seems to power the PHY down. bcmgenet_mii_probe() sets
> mac_managed_pm = true, so mdio_bus_phy_suspend() returns early, and
> bcmgenet_suspend_noirq() only powers down an internal GPHY via
> GENET_POWER_PASSIVE.
> 
> So an external PHY whose driver has both .soft_reset and .suspend (for
> example genphy_soft_reset with genphy_suspend) would stay powered with
> its link up through system sleep.
> 
> This would not show up with the bcm54xx PHY on CM4, which has no
> .soft_reset, or with the Generic PHY driver.
> 
> Does the !priv->tx_cbs path need a phy_suspend() call (or similar) when
> WoL is not in use?
> 
>> 
>>  	netif_device_detach(dev);
>> 
>>  	if (device_may_wakeup(d) && priv->wolopts) {
> 
> [ ... ]

Same as in v2: pre-existing, phy_init_hw() powers it up in the failed
resume and nothing starts it again. Fair that it's reachable now, before
this series that suspend just hung. Nobody seems to have hit it either, 
it
needs a failed resume plus a PHY with soft_reset, so pretty much an edge
case, don't you think?

I'd rather not add a phy_suspend() I can't test ... the CM4's bcm54xx 
has
no soft_reset, so the PHY never gets powered up there anyway. The proper
fix is to stop leaving the half state behind, that's on my list after 
the
MTU series.

Thanks,
Nicolai
Technical Details
Message-ID: <7a86dc120223465e88cc265a6f597657@tipi-net.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-351058-linux-kernel-netdev=dewy.ru
References: <20261022-nb-genet-fini-dma-net-v3-1-6e9fc89c0156@tipi-net.de> <179275652332.3134.3420351260504788140@kernel.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-351058-linux-kernel-netdev=dewy.ru
From: nb@tipi-net.de (Nicolai Buchwitz)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net v3 1/2] net: bcmgenet: recover from a failed resume
Date: Fri, 23 Oct 2026 14:04:34 +0200
Organization: Usenet Network
Message-ID: <7a86dc120223465e88cc265a6f597657@tipi-net.de>
References: <20261022-nb-genet-fini-dma-net-v3-1-6e9fc89c0156@tipi-net.de>
 <179275652332.3134.3420351260504788140@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII;
 format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="491647"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:35PJIID1BqkLejSnpKNRdXAiVnk= sha256:eyGWw5PPFbDBSSiZsResId6SvQB6+t5hwwMUiYYNcqg=
	sha1:T+eplBE7Z9g62uTs7FGqo6iaV5o= sha256:wQxNvsjCafa9dTi5ypVcyfPxFuRltTm0yU+YOLUlhC0=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id BD3BE11148F; Fri, 23 Oct 2026 15:08:49 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=tipi-net.de
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 6LJr__TTAQz3;
	Fri, 23 Oct 2026 15:08:47 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-351058-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=tipi-net.de
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id BE4EE11147F; Fri, 23 Oct 2026 15:08:38 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id F32273764F; Fri, 23 Oct 2026 12:04:47 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1792757087;
	b=Y5c2/yjNzwe8020iGZwXji6Z7fvzdhAMnnTH3TxHXWcxhSpSM2NMPM6YWLZBOJ/wMqNk
	 iJoqCuH2eFxn5IlEZxyq3SCpfoYbH/xka0VD2T82RtLQj6mbW6ZK1NYOpUs19M597vbXZ
	 Hh1xMTwtiqU7iAIZjnU4tW5/gttwgGoCm0QfxFBAWYs6tXHhJ8Wd2XKPWaWqG5Zs2lw6G
	 Q71TZ2RTGCwClx+sCsfDKEdledcnYD+5Yy6P925vI55Ym0XOKU3IB5bRecA56HtDUM7xI
	 kbVJn6bteRUkLmzZTCufenTUvU7TTpy8IC2AJTeGovX0kPP+3ca+Pwr/W3ksP5mtxKA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792757087;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:Date:From:To:Cc:
	 Subject:In-Reply-To:References:Message-ID:X-Sender:Content-Type:
	 Content-Transfer-Encoding:X-Last-TLS-Session-Version;
	bh=ycGpS7m1sazcu7mkgUYYOYML6LDBpyZoHUVl6pqsqzQ=;
	b=B3FYTIPmrG6nqisC3YBbvNLoB+bDiNst1iWZS+frmMJ0ajx8LHb6c994z+Lgui0fKzQg
	 /HwKIzDxq3Qe5xAEGtczgtbihhMTeNHi3jjNYZydf9R6LQnQccuUXufzrsBcVIK7hXrxT
	 +oJp9HUnRxWPkbRPIeLWTwqnUR6+3yc7weOssxx/Qpu7YNKn8GaYcz+ESLR5dKargBx/p
	 +gjZmGo1PlQmodp6ZLD8safalnArpxItDsmHXSHRI5jG+/IUrNKmhi7tjU7n8fBhuHd/q
	 VSdHmhm6pVintQ2kDW/HjJ5bdozWUSWFjEQRIqdy5+xEPcU4E/yxqrLl+K2jsg1HdWA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=QJMUxINU;
	dmarc=none header.from=tipi-net.de;
	spf=pass smtp.mailfrom=tipi-net.de;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 969C1606A323;
	Fri, 23 Oct 2026 12:04:47 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=QJMUxINU
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=194.13.80.246
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792757081;
	b=vlshY8Gcd8B/2IeKNEpoOmUHkb/bUTitT1vZ41kRCK2GkfRVAq0m+Wznu3zvWRTc7hap
	 ieS2ABHElqh1rTR6cOKiQBel2008crTQo1fxDysbXEKtFv0Y/1mQICIpZ3ehsa5azYfYg
	 zkOO8I/5deiHdxlLwYiAby6WSA8eyTmblC6W9Xd6gfhigGw88KJy/BdUaD7CcDTk/2ONj
	 FHo++goKgiOSHGx48D9OhurB1Rodj3A22H6eH6Zuf8uBoGUBhYqysGL9w4ZLxW83MnGn1
	 v/I0xFKMztcS+fNvTly7plAD3YFgJvX+UXTJXJuslAcAunPl3F+H3JvTHq9qe6gBQAg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792757081;
	h=DMARC-Filter:Received:DKIM-Signature:MIME-Version:Date:From:To:Cc:
	 Subject:In-Reply-To:References:Message-ID:X-Sender:Content-Type:
	 Content-Transfer-Encoding:X-Last-TLS-Session-Version;
	bh=ycGpS7m1sazcu7mkgUYYOYML6LDBpyZoHUVl6pqsqzQ=;
	b=cgvOCywd8z35oJOrx6tU9TuUf3PIFqRn8tLZ+GSxeguuzgxJpDvBgtuB4t5bZU2HVMh7
	 YedIrdWwJsXhd9cKBr0rZs2BMBm4tQOibFCAJKjxtNAJfq6t0rCWEVVYxXyWmzKPOkZh+
	 12zxx9uEdU5muuZg4fiE07LQGH4cbhwtPth0WCKxnr0PmplmvsrXtPig9K10oUVuT6DoJ
	 CHtLrqsGJa38wCLlOiwVg+s2UnMKovp2Jaso64hsstr0F1CNJUCDIVxeO0RnSmgdh9HkX
	 +KhtPptnSEXe4Vuoan3O4QWAem+qvZspEpt37VkfaIC1vXfSZf+4HWLPMYyqosQpVBA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=none header.from=tipi-net.de;
	spf=pass smtp.mailfrom=tipi-net.de;
	dkim=pass header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=QJMUxINU;
	arc=none smtp.remote-ip=194.13.80.246
X-Received: from mail.tipi-net.de (mail.tipi-net.de [194.13.80.246])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id B851B606A31A;
	Fri, 23 Oct 2026 12:04:39 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B851B606A31A
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tipi-net.de
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tipi-net.de
X-Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id BC4E9A0956;
	Fri, 23 Oct 2026 14:04:34 +0200 (CEST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tipi-net.de; s=dkim;
	t=1792757077; h=from:subject:date:message-id:to:cc:mime-version:content-type:
	 content-transfer-encoding:in-reply-to:references;
	bh=ycGpS7m1sazcu7mkgUYYOYML6LDBpyZoHUVl6pqsqzQ=;
	b=QJMUxINU5RSW7wDNpwFRUl/HAYtKVfvyH7AG/PbbRicLGcGnnxeq6gKY1Y/ZbEPkhIJ1zE
	MG98EbZkza/JjxetgPrliEK4gsbzR17wp/PeEqle9ZKTpBviHMgIUrGGUDnOJkgsR+fAUc
	e/IkQnbBJ2GJ4azxfRHEThxAIcHvBTAclbw3laxeBXsfxjaCyi/ZPVO+kG50J9aj/Oc29n
	LT9qq0XhC84HuZva2n+SPS4jTjH9iPoX1DCrawmxsNrA61oYhSHkyD/qIrgco3Pwwl1iaL
	GPmDe31Abnk/C29UqOsAuzeN4vFXXsll0nY8TyHCT1tpFqgwCK+9rWtQY+3jHQ==
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-Cc: opendmb@gmail.com, florian.fainelli@broadcom.com,
 bcm-kernel-feedback-list@broadcom.com, andrew+netdev@lunn.ch,
 davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
 pabeni@redhat.com, justin.chen@broadcom.com, f.fainelli@gmail.com,
 netdev@vger.kernel.org, linux-kernel@vger.kernel.org
X-In-Reply-To: <179275652332.3134.3420351260504788140@kernel.org>
X-Sender: nb@tipi-net.de
X-Last-TLS-Session-Version: TLSv1.3