Article View: linux.kernel.netdev
Article #8323Re: [PATCH net v3 1/2] net: bcmgenet: recover from a failed resume
From: Simon Horman
Date: Wed, 28 Oct 2026 17:23
Date: Wed, 28 Oct 2026 17:23
66 lines
10397 bytes
10397 bytes
On Fri, Oct 23, 2026 at 02:04:34PM +0200, Nicolai Buchwitz wrote:
> 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.
FWIIW, I agree that is an appropriate approach here.
Reviewed-by: Simon Horman <horms@kernel.org>
Technical Details
Message-ID:
<20261028172305.GB257209@horms.kernel.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-352968-linux-kernel-netdev=dewy.ruReferences:
<20261022-nb-genet-fini-dma-net-v3-1-6e9fc89c0156@tipi-net.de> <179275652332.3134.3420351260504788140@kernel.org> <7a86dc120223465e88cc265a6f597657@tipi-net.de>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-352968-linux-kernel-netdev=dewy.ru From: horms@kernel.org (Simon Horman) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net v3 1/2] net: bcmgenet: recover from a failed resume Date: Wed, 28 Oct 2026 17:23:05 +0000 Organization: Usenet Network Message-ID: <20261028172305.GB257209@horms.kernel.org> References: <20261022-nb-genet-fini-dma-net-v3-1-6e9fc89c0156@tipi-net.de> <179275652332.3134.3420351260504788140@kernel.org> <7a86dc120223465e88cc265a6f597657@tipi-net.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: usenet.network; logging-data="1824001"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:pfA70U2rom4jhxd5pWHn4TURtiU= sha256:Cf7koGdKKyczOiJQFtyvSTN71TCPWSHybDmoa2aah+M= sha1:aVo3B6IuHP5iFr6Lr0wDilx2/xw= sha256:cRDHkYoqI0p1EpywFqvwz9oGz87N0zGRLP3mhtFES1k= Content-Disposition: inline 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 EBC69125C43; Wed, 28 Oct 2026 20:26:24 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.401 X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org 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 6X2yutcYGGjr; Wed, 28 Oct 2026 20:26:22 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-352968-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mail.dewy.ru (Postfix) with ESMTPS id A963B125C40; Wed, 28 Oct 2026 20:26:12 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sin.lore.kernel.org (Postfix) with ESMTP id 8DF2527651; Wed, 28 Oct 2026 17:23:20 +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=1793208197; b=oRrOgbHGVVEQzm2nN0XxKniAm1XRt6YzSmIZR5tZpCZc/WswOS3EbdA1NKeq6bNDCP+j 5xyiA+xhCgz0Q4CUZpytXAnLQPT460bthYfU+P6vaqPvco0Ic5hx3Uw9uyFqtDtYMRUIO zl5BWQ40uHNaAEqu2Yz1EQeYkKjTlVzFIMNuT0gF/WXy91Oy2err9o2lGBWuC/eHzBz1x 6+oMzLqB2r0burxRK4wk39z+OIh0tyveObOAfRc7R7Nmz99h9127ZakH6NK1pCCkTLFHQ iLowk8vfzWh5DVthPqtwke8TxBUoR6UGweVwKUfzP7qJeBmY34aLdNWnAphyn0ehSFA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793208197; h=X-Original-To:Received:Received:DKIM-Signature:Date:From:To:Cc: Subject:Message-ID:References:X-Mailing-List:List-Id:List-Post: List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence: MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=ZggAsEZzDz8Xs5cq1SmLTCdVdYwUDmu3WpWyKwp22Pk=; b=JoXbxo+PM1unFBpdzvGtE8SttJf4bLauDSucYlY8xYE1+HS880PZ7R5scpyj+K4HesiB grz6p1hyW9y06Ubr3MIl8+vJRPNIDCuG6d3uU0zHBULJMg3QpLWng3ySktNYb0O3Xs3N0 cjE5kgoi5JlnjfLgdDtSuByyAxvmmME1UC+0Cb1ajKop6VUNCv7E+BqXoYSY9pfE2Zc3U X9YevmMH2pX2RQ/0mRHABdBA20LIUcy9ToVNhRV2ERA0BThbFGtXsKP3tm38RLUqM7v7X E54JteTCUaYUY+HjROHZo1plSY5tzUAM81YmBffVoJuKnlQ/iZshHAm3VHC39e11OhQ== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=kAxceFAm; 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 B2C95606A327; Wed, 28 Oct 2026 17:23:17 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=kAxceFAm X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793208190; b=tYseKAeXvHdTAiVljiNB6493LTyDqrvXkqDCxaIbfhg9+eCTZgV4NGIXpzko5XHK/uqG ujqd4Ari4bearL004YHQz87vEdcvWVcxVXwl3xREW73Sz6Y1whVCDyTYEN/DH0yRBCIKD TjdTao1FmM8h2j4Y1ZiTV7pVlOFfvnUzXIa2eajuDHmVKJk+EssZ85xOfgbsICp7ccvMT XOC3w7q7gFvY8NcOkFQdibQ+krOnikWthcqgYzELLbT/REdJC0pKsODsLWcNb3/XOecWF cr7nWqk7BR9zOjvpigmoeLEMuTP1nwUaNb9sdwH28dPYkUJDfpPJWOiQSYFG4ZQmgQg== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793208190; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=ZggAsEZzDz8Xs5cq1SmLTCdVdYwUDmu3WpWyKwp22Pk=; b=VD1mNy4pH0xSlYBYkNZnEcTIxht7VflnCmqNjEt2j51M7vXEjYvhA8bi1ZPE/M+512y+ YB3uNbI+XOc+9R8+MibytIIUkIgZ+4iKUYndjx5YHaEbjdUv8JYv6Ir50vxiFghvKarL5 iKCcn53It/ZTxPd3P7XYs4Bu00+pmU20v05XXznT8lt8D/2yma9DLYBIxByrOJAOQ2cIu QgYo9Pylf+6MJvofOLb/1BJXC6xZZAB8uNl5QL66lsifa+oMvfjfzuOHmFJLDwbVge0s5 9X1LSkRPTTdE8yPi/lHFD+suyW//uxwEDM7xi93XylnX4ZN2cWLFgOoLDsw0n/IEuhQ== X-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=kAxceFAm; arc=none smtp.remote-ip=100.103.45.18 X-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 834F6606A31F; Wed, 28 Oct 2026 17:23:10 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id CE59C1F01828; Wed, 28 Oct 2026 17:23:07 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1793208190; bh=ZggAsEZzDz8Xs5cq1SmLTCdVdYwUDmu3WpWyKwp22Pk=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=kAxceFAmMtDu1Cg6KSXuYu5ewjTR6OwhSYEjVAJrHB6YYXBBNKLxBnJEuDPe8cJ5c q8uq2384HUh9A/dBqNZM+wv2lVwCofDY5V+cICPoKOtMWfiZSvQI9AEve/AA5SGT6T N0daUJse1XImpoGfJR3VK1nMCY0KZXmDchDDSPwX+yKm7BqrvrgQM2dibaVpStBUGK DAfWmPgOw1mUBgyJSmP1rOIpcCSqq6A8dcLj3icOPgGM74vHBN6lng3IO6VLEDpySR +UQhoBx7kCWt2D9n65f7e4yhSYfFx/261ZaWPm3On097THfojvgGWQrrKSJThLV4rH P75KZ8fAwB1Dg== X-Cc: netdev-bot+sashiko@kernel.org, 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-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-In-Reply-To: <7a86dc120223465e88cc265a6f597657@tipi-net.de>