Article View: linux.kernel.netdev
Article #18576[PATCH net-next v8 2/9] net: bcmgenet: let the caller decide whether to start the PHY
From: Nicolai Buchwitz
Date: Wed, 18 Nov 2026 15:03
Date: Wed, 18 Nov 2026 15:03
59 lines
10132 bytes
10132 bytes
bcmgenet_netif_stop() already takes stop_phy, bcmgenet_netif_start() does
not. The MTU change in a later patch leaves the PHY running while the
datapath goes down and comes back, and phy_start() expects a stopped PHY.
Add the same parameter to the start side.
No functional change.
Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
drivers/net/ethernet/broadcom/genet/bcmgenet.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
index 1114fe46d2f7..4c2a38eaab10 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -3390,7 +3390,7 @@ static void bcmgenet_get_hw_addr(struct bcmgenet_priv *priv,
put_unaligned_be16(addr_tmp, &addr[4]);
}
-static void bcmgenet_netif_start(struct net_device *dev)
+static void bcmgenet_netif_start(struct net_device *dev, bool start_phy)
{
struct bcmgenet_priv *priv = netdev_priv(dev);
@@ -3407,7 +3407,8 @@ static void bcmgenet_netif_start(struct net_device *dev)
/* Monitor link interrupts now */
bcmgenet_link_intr_enable(priv);
- phy_start(dev->phydev);
+ if (start_phy)
+ phy_start(dev->phydev);
}
static int bcmgenet_open(struct net_device *dev)
@@ -3470,7 +3471,7 @@ static int bcmgenet_open(struct net_device *dev)
bcmgenet_phy_pause_set(dev, priv->rx_pause, priv->tx_pause);
- bcmgenet_netif_start(dev);
+ bcmgenet_netif_start(dev, true);
netif_tx_start_all_queues(dev);
@@ -4369,7 +4370,7 @@ static int bcmgenet_resume(struct device *d)
if (!device_may_wakeup(d))
phy_resume(dev->phydev);
- bcmgenet_netif_start(dev);
+ bcmgenet_netif_start(dev, true);
netif_device_attach(dev);
--
2.53.0
Technical Details
Message-ID:
<20261118-nb-genet-mtu-nn-v2-v8-2-68f75eadf3e2@tipi-net.de>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366205-linux-kernel-netdev=dewy.ruReferences:
<20261118-nb-genet-mtu-nn-v2-v8-0-68f75eadf3e2@tipi-net.de>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366205-linux-kernel-netdev=dewy.ru From: nb@tipi-net.de (Nicolai Buchwitz) Newsgroups: linux.kernel.netdev Subject: [PATCH net-next v8 2/9] net: bcmgenet: let the caller decide whether to start the PHY Date: Wed, 18 Nov 2026 16:03:35 +0100 Organization: Usenet Network Message-ID: <20261118-nb-genet-mtu-nn-v2-v8-2-68f75eadf3e2@tipi-net.de> References: <20261118-nb-genet-mtu-nn-v2-v8-0-68f75eadf3e2@tipi-net.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="2623792"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:2NG2JUwJdrlTc6UKkN30McQeKdU= sha256:NMldaOqjU7RSY1rn5xnLxO6cSIxtj1/U8s+WU7YteOA= sha1:D5bLY/xQXz8ns7N8uwB6quT53rA= sha256:1lVyKUTbvWoxQpQYrXIS6FZNW91pUZXwjPab3u/u4pE= 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 B60781152D9; Wed, 18 Nov 2026 18:05:02 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.051 X-Spam-Status: No, score=-3.051 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.249, 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=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 5L_2exrLZ76i; Wed, 18 Nov 2026 18:05:00 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-366205-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 B2037115257; Wed, 18 Nov 2026 18:04:46 +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 CAE3C3C069; Wed, 18 Nov 2026 15:04:24 +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=1795014256; b=iH8ei/x07su256xHO6N4o8jPRNvg5Nkz/8razPhOzwJcxUnWNVq9RgdqbRJV+tGdKc62 9Wte4swsPRqkqWrCAWui8YLWSUUix5gU+GZhS0XOYr4bha6C/ot56I1SdMP8vhQO5Eq7E TeaI2e0SA6S7h9N6sDEFUneURs9AlugkFBzMu9zWqm5Z2k4dTPB2SNsOF7Mv33iKUqsCS LKruA0G9Yb3O8nZG3J8sSbTXfBGAmUvE10fzTPRsGgZ7wZC7r6w6hNW5rN+d6vh/MfISz h9EWq8n09xrYsir7NKoALyqTHu2FkWuSuO0EEKEuyq/0L1jIq4YHaqMgoilF14T8nnA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795014256; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:From: Date:Subject:X-Mailing-List:List-Id:List-Post:List-Help: List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Type:Content-Transfer-Encoding:Message-Id:References: In-Reply-To:To:Cc:X-Mailer:X-Last-TLS-Session-Version; bh=oZgYwMLCb1rnx4KZqfeFvtHgyDQKffOZbXtJHVAzaiw=; b=Vm5qSjK3kxBAlCNB1t7veEDwGVR4u4XmrwkzNLzExwpWMSQKS4DAoMElOS10V4wPg4GH VUeDdqsedy9fI/25L0AfjUAyQJuWDg0u5X3sXRj1zvZ6U1/YVUJt3q4U9NDBGbykKYJ0x zCjL5YDBeUDi3Bxr2Xme6dhETiQGuLBVBNhJRGmezRwCLwoFoOQ2mMVNK3AWc3+DE4oCP xOnKqF8Dup3m6qiTryW439RXa9vYpBOyln+hmb/+SZJ2+q7OWHKjPCbTXjFxdMEoq6Ims qd2sUpOUeBX3M8p7IhBT/dGbiYhece2Jmz1nNo1hEV8btstXj7lZPoNtd6lPTBebLUA== 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=GYc1cBdn; 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 D8BBC60A2617; Wed, 18 Nov 2026 15:04:16 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=GYc1cBdn 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=1795014256; b=cwSPXKkd70VTMmaL091ijTJaf/0kUkQkxDpdDfCQu+H/bDR/qj2nT8tUaCc8Y9lvQ19s OhCkJcrEjlkEIOpfEnKlyYjC6sx/ZYk8rDQPsZEt/yeQe34exEFrCTVgMB4KT9/pTVDdQ TC+bJA7QfivEMuZRE5Vp3yttJjGihKoq3LQqWd35OamEBiKh8F+GauF3SKW7NCCFmSgv1 a55F/qd5uYWvq2KHlctpl2k4TFaX2XDQCEY/MRDMkda8cGpX7LUM+rEEFSVSccIRjjlbm RkmnaTInFVSO4EHaXW0c4nBZ2i56YcNyAOAUqiun9fKLxkj14p+TYVPRB/OzWArHJUw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795014256; h=DMARC-Filter:Received:DKIM-Signature:From:Date:Subject:MIME-Version: Content-Type:Content-Transfer-Encoding:Message-Id:References: In-Reply-To:To:Cc:X-Mailer:X-Last-TLS-Session-Version; bh=oZgYwMLCb1rnx4KZqfeFvtHgyDQKffOZbXtJHVAzaiw=; b=lqupp1Ea6/t0D9U39mDOhubxF6Ulzkig1wX1LLqSXUMpR6xmvSsRK/tDCuHqckasKTwd n6aJeYMcajGscKuz6QQdpcbuVjqXJ8WEV5DbzHTJCxuyjseoh9ZYmi44Dvq6PsWHjO+pe Go0A522Z3EzLyB1UyFH1NZ2BSRUQNZCanSP4cpTKcFwaPtRcicjOKzvGpnHVO7SYxFV72 XPr+iGrxfefoNIXuMn6WGEelQAUlwBXtwWbPyJQQG5LuZ/gtbzlBNdewQsO6JmxybdO5l 86+yKhypNm2KaHnQevWCZH/q9Hlr6n4gaQnYh1SaDiRYyp5w8KvOFRV0AToqEhdzi7g== 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=GYc1cBdn; 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)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 881FB606A33E; Wed, 18 Nov 2026 15:04:15 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 881FB606A33E 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 B0FFAA21B9; Wed, 18 Nov 2026 16:04:10 +0100 (CET) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tipi-net.de; s=dkim; t=1795014253; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=oZgYwMLCb1rnx4KZqfeFvtHgyDQKffOZbXtJHVAzaiw=; b=GYc1cBdnelevgw9K4tU2JrRH5FhKzjn0FQN2p5GNsU3kMFURubqe+BRAlm4CKzu8txPuZn 6ZuUaqywVuSApTbdTMLI9PSYXsMc3b4J4hvroTyHt//T/sSZKElD4sBKaHe7k6skiET+zK hlrHURQdTci9vlc3xEp11NMSR7eu9P6F1v5rNTVYGlUYMRSkV1twZRYQH2QE7SSdXKkJFz f8pcvLd+rw9vGpYsu+d6YNEIjjtaJv0uNffFAYcB0Dk3liUi24OzvS7R0xBPiI+e0a7DhV ZFu7zULF6Jw2oag7e9E7wNJ3x2SrcLVfrd/zEW93Rxb+i0U7s+sKRsUqQPNt0w== 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: <20261118-nb-genet-mtu-nn-v2-v8-0-68f75eadf3e2@tipi-net.de> X-Cc: Florian Fainelli <f.fainelli@gmail.com>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.16.0 X-Last-TLS-Session-Version: TLSv1.3