Article View: linux.kernel.netdev
Article #119[PATCH net-next v3 2/8] net: bcmgenet: let the caller decide whether to start the PHY
From: Nicolai Buchwitz
Date: Wed, 07 Oct 2026 08:51
Date: Wed, 07 Oct 2026 08:51
59 lines
7767 bytes
7767 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 06ec8c211dd7..86c8f8f8fe15 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -3355,7 +3355,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);
@@ -3372,7 +3372,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)
@@ -3435,7 +3436,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);
@@ -4319,7 +4320,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:
<20261007-nb-genet-mtu-nn-v2-v3-2-74a796c019ce@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-342260-linux-kernel-netdev=dewy.ruReferences:
<20261007-nb-genet-mtu-nn-v2-v3-0-74a796c019ce@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-342260-linux-kernel-netdev=dewy.ru From: nb@tipi-net.de (Nicolai Buchwitz) Newsgroups: linux.kernel.netdev Subject: [PATCH net-next v3 2/8] net: bcmgenet: let the caller decide whether to start the PHY Date: Wed, 07 Oct 2026 10:51:25 +0200 Organization: Usenet Network Message-ID: <20261007-nb-genet-mtu-nn-v2-v3-2-74a796c019ce@tipi-net.de> References: <20261007-nb-genet-mtu-nn-v2-v3-0-74a796c019ce@tipi-net.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="611805"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:7oFmIFnVGVrYZvqiG06R8peq/H0= sha256:PincGAhmq+mqrGhWnJdcHsdCGVh7lVxeE2G6eHIXswI= sha1:LS+RbjROrQ8fkZve9hPkMJkO158= sha256:5nMQ9s88PTOUzIZj+BvF/GTmqDwQ8mdGSuLB653axI0= 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 5DD8D10F115; Wed, 7 Oct 2026 11:56:26 +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 Lq8bzZr8KLmd; Wed, 7 Oct 2026 11:56:19 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-342260-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 6263310F108; Wed, 7 Oct 2026 11:56:16 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 122702D507; Wed, 7 Oct 2026 08:51:56 +0000 (UTC) X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9A40645C709; Wed, 7 Oct 2026 08:51:55 +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.b="XEiLfQ3h" X-Received: from mail.tipi-net.de (mail.tipi-net.de [194.13.80.246]) (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 9536545A295; Wed, 7 Oct 2026 08:51:53 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.13.80.246 X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791363115; cv=none; b=bYk8jnr0nQfBu5ROiC5ZRdg0/vAxavnlGBObbqTX6l0IiEJlFiB7TfDbhwpx+0q6lZsh+aIMeqeEfx9tw3BaN2DisJFYTZvwFAodSvClNjQ52IImg/oMMEj+DMtIgFbM9nW5Qf+NcFb67jBkoCk8LX8vHQWLXcdGEGlhA++MkUk= X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791363115; c=relaxed/simple; bh=8xyGTVEkmxmfRvSSjdAU86YxykwJeMrd5wfBHVBPG3g=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ie5XBgU5yMDydU8dIF7auQc4gzZkDz9A+F636Oxsy4bxM/Gq3ekusMUWrFB8V/4aj2Hu4ZNNG4DIcbXHe0u0V0ZB8c2QLJPRJeIOxDQrQ1MPkWONSGQwb2q3qpWhds8y6ATSSCNQHTfaJncBjlU3YTicHFSOGZh9rNepSM+EH/0= X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tipi-net.de; spf=pass smtp.mailfrom=tipi-net.de; dkim=pass (2048-bit key) header.d=tipi-net.de header.i=@tipi-net.de header.b=XEiLfQ3h; arc=none smtp.client-ip=194.13.80.246 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 25E7AA154B; Wed, 7 Oct 2026 10:51:51 +0200 (CEST) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tipi-net.de; s=dkim; t=1791363111; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=dpFChvbEesnvDXRSkyeZBgJNwteHzQwyPWv2P28uGdA=; b=XEiLfQ3hiAFf5YptSDuGBoiHB8Qjpezy3K9aMpgGEWgF8M3LwbMgyIDAyAsu/jMA8G1c+9 W8brc4JcBByHwltrZ+g5OWzBkNnxW9dPDXa192hJn5uC8/+MjepkEAwFHYyJRu4bsBonBZ ruEW9aAjKyGPltfoBEpdXk6bQQPz1WnVGo89dLZmnS7ZS0NPakPzZCzDuLXpBlsPW1Kz8h gowRZTyfm74YVjSTlJD3chSroBsCo+cpDQhGBk7nLTsVbUwAZguHDwL11BpIr5h2A79VMn DTkPD17xoqZu7oX3Iu1mHMirLBH/DzRdHKQ4UVLzaJ0t+vp3Obu62bnpeBAf3A== X-Precedence: bulk X-Mailing-List: netdev@vger.kernel.org X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-In-Reply-To: <20261007-nb-genet-mtu-nn-v2-v3-0-74a796c019ce@tipi-net.de> X-Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Dave Stevenson <dave.stevenson@raspberrypi.com>, Justin Chen <justin.chen@broadcom.com>, Pierre-Marin Leclercq <pierremarinleclercq88@gmail.com>, Nicolai Buchwitz <nb@tipi-net.de>, Florian Fainelli <f.fainelli@gmail.com> X-Mailer: b4 0.16.0 X-Last-TLS-Session-Version: TLSv1.3