🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #4312

[PATCH net 0/4] net: bcmgenet: fixes for a failed resume and the ring rebuild

#4312
From: Nicolai Buchwitz
Date: Sat, 17 Oct 2026 11:59
51 lines
8053 bytes
Mostly findings sashiko raised during my recent review sessions.

Patches 2 and 3 are the same failure, a resume that fails in
bcmgenet_init_dma(). The interface stays up with the datapath gone, and
the next ifdown hangs in napi_disable() with RTNL held. Patch 2 stops the
second teardown, patch 3 gets the interface open again instead of leaving
it detached with the clock released twice. Forcing the resume allocation
to fail reproduces the hang, the box then needs sysrq-b.

Patch 1 comes first because patch 2 sends one more case down the WoL
resume path, which calls phy_start() on a PHY the WoL suspend never
stopped.

Patch 4 is about the ring rebuild itself. The Tx coalescing threshold goes
back to the driver default whenever the rings are rebuilt, throwing away
what was set through ethtool. "ethtool -C eth0 tx-frames 16" followed by a
rebuild reports the default again.

Patch 1 fixes the rebuild path, not the cause. bcmasp parks the PHY in its
WoL suspend and has one deinit with a flag, which looks like the direction
for genet too. But one step at a time :)

Patch 2 is also prep for the next version of my MTU series [1], which
drops the "hallmark of a bad design" flag in favour of the ring pointers
it clears.

[1] https://patch.msgid.link/20261013-nb-genet-mtu-nn-v2-v5-0-076b6fc240be@tipi-net.de

Patches 2 to 4 were tested on BCM2711 (Raspberry Pi CM4) with the resume
allocation forced to fail. The WoL paths in patches 1 and 2 are untested,
the board has no wake source.

Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de>
---
Nicolai Buchwitz (4):
      net: bcmgenet: stop the PHY when a WoL resume rebuilds the datapath
      net: bcmgenet: do not tear the datapath down twice after a failed resume
      net: bcmgenet: let the interface be reopened after a failed resume
      net: bcmgenet: restore the Tx coalescing setting when the rings are rebuilt

 drivers/net/ethernet/broadcom/genet/bcmgenet.c | 49 ++++++++++++++++++++------
 drivers/net/ethernet/broadcom/genet/bcmgenet.h |  1 +
 2 files changed, 39 insertions(+), 11 deletions(-)
---
base-commit: 8e2fbe0e75d38690d551456658194c632933cb57
change-id: 20261015-nb-genet-fini-dma-net-62a39ee14e65

Best regards,
--  
Nicolai Buchwitz <nb@tipi-net.de>
Technical Details
Message-ID: <20261017-nb-genet-fini-dma-net-v1-0-47e7c57f6834@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-347735-linux-kernel-netdev=dewy.ru

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-347735-linux-kernel-netdev=dewy.ru
From: nb@tipi-net.de (Nicolai Buchwitz)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net 0/4] net: bcmgenet: fixes for a failed resume and the
 ring rebuild
Date: Sat, 17 Oct 2026 13:59:24 +0200
Organization: Usenet Network
Message-ID: <20261017-nb-genet-fini-dma-net-v1-0-47e7c57f6834@tipi-net.de>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="3034782"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:RWxuBde76cuEa9Dzbg1A+94JJOk= sha256:2jXXXRw3BTHHr4GdBY7A83KaBnwqe3W5s2FFtFsQjXs=
	sha1:cEXBaNh9XMba5Eur/P5XUnjckWE= sha256:mbKAVJJ2HpHeduMwNOR0/OQu9+4rVt+Gy2z/Z3UU4Vg=
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 04BCD1106D9; Sat, 17 Oct 2026 15:00:44 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.05
X-Spam-Status: No, score=-3.05 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] 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 pTTlMAHSzM1b;
	Sat, 17 Oct 2026 15:00:41 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-347735-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 B50371106D4; Sat, 17 Oct 2026 15:00:32 +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 ABC393BBAC; Sat, 17 Oct 2026 11:59:43 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id E714C48FF6F;
	Sat, 17 Oct 2026 11:59:40 +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="cpZfCK97"
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 9D308377A9E;
	Sat, 17 Oct 2026 11:59:36 +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=1792238380; cv=none; b=gBYsuWoJAjqg0xExrX7llFyJ523i3QibOf49KibkzwytMkvR95dZneDzGLRDQ4zSuu6oY3o8qoKbv7bYMMyatBR70U7W7Lvk/ht/vrpclB2nB1raQkxvLxPtn0/2X772+jhAL9nzy3Os7pV7ABvGwBOI4diKo/7lqqm51ut5oSs=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1792238380; c=relaxed/simple;
	bh=Rg+O0whlHvGMEyxRlqyGPWW+7RU+DNt9faLEtVqLyeU=;
	h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=k5DmSyB3Ib069zdcwhJpHTt8fK+Q2xYBMDSOP3k6jdOwc5WQFFQxF2l85o2+A3RBRGNasPT3ZF+J9UBGjVfCwwUEimd9ILTj7cXc/++Oy3IrTKKjrcQHaHG+eZMWqRGLYsSC3o2Dobm/jHd+hjSaQgw4nTR0F/H2HrCizabWByg=
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=cpZfCK97; 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 396BBA1568;
	Sat, 17 Oct 2026 13:59:31 +0200 (CEST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tipi-net.de; s=dkim;
	t=1792238373; h=from:subject:date:message-id:to:cc:mime-version:content-type:
	 content-transfer-encoding; bh=7eOadjvXvNY8wRcWPVKDe9x8GwetLNjio5IA6aOhh3g=;
	b=cpZfCK97PHNgLfl5/ThtZd0VN3afcBljc47pNB0iOTn8drPhtepkrkMojlstz/cLid7muT
	p8QeR2MiReHVbfh/laDnYOwGCts5gu2cTPBTUVK4BqB2izqmzYjVP423aWlM+m12dyOqdE
	kbjcOOjOQsW48QpQPiDpohzQAw+JhssRx8qAXJQlpI/jYy+BJfyhFawCCU6nXi0mPbKVnD
	3GvIsDVf+jzQbJVShult3aIdA72BApp03SxaNr2r9qztwT6SMEvfJNhpM3O6+tSxN1RzSq
	fq5qQY3x6TeEe/k1hUSDpsvnZw6iaHdQUH1jQf3p3olLEgbuUnVNjb8arA+RXQ==
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-B4-Tracking: v=1; b=H4sIAAAAAAAC/yWM0QqCQBREf0XmuQvumgv1K9HDqqPdoFvsWgjiv
 7fW4xnmnBWZSZlxrlYkfjTr0wq4Q4X+Fm2i6FAYvvbB1a4V62SicZZRTWV4RNkh+NicSHdkaFH
 cV+Koy697QTng+h/zu7uzn/citu0LbXjU2n4AAAA=
X-Change-ID: 20261015-nb-genet-fini-dma-net-62a39ee14e65
X-Cc: Florian Fainelli <f.fainelli@gmail.com>, netdev@vger.kernel.org, 
 linux-kernel@vger.kernel.org, Nicolai Buchwitz <nb@tipi-net.de>
X-Mailer: b4 0.16.0
X-Last-TLS-Session-Version: TLSv1.3