Article View: linux.kernel.netdev
Article #6335[PATCH net v3 0/2] net: bcmgenet: fixes for a failed resume and the ring rebuild
From: Nicolai Buchwitz
Date: Thu, 22 Oct 2026 08:54
Date: Thu, 22 Oct 2026 08:54
89 lines
12315 bytes
12315 bytes
This is v3 of my resume and ring fixes for genet.
Mostly findings sashiko raised during my recent review sessions.
Patch 1 is a resume that fails in bcmgenet_init_dma(), which leaves the
interface up with no datapath and the next ifdown hanging in
napi_disable() with RTNL held. It is one patch because nothing that
resume leaves behind is reachable on its own, the second suspend never
returns until the hang is fixed.
Patch 2 (was patch 4 in v1) is the Tx coalescing threshold going back
to the driver default whenever the rings are rebuilt.
Patch 1 fixes the rebuild path, not the root cause. bcmasp for example
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 :)
It 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
For backports: the WoL hunks in patch 1 need 254f3239dd07, on older trees
they can be dropped. The rest should apply on its own.
Tested on BCM2711 (Raspberry Pi CM4) with the resume allocation forced to
fail. BCM2711 has no WoL irq, so I had to force the capability.
With this a magic packet wakes the board and the interface
recovers on the next suspend and resume. Thanks to Florian for pointing
out that s2idle can do this at all.
WoL doesn't wake the board after a failed resume though: as sashiko
pointed out init_umac() left UMAC_CMD at 10 Mb/s and only adjust_link puts
it back, so it arms fine and then misses the packet. But this is
pre-existing, arguably even better since it no longer hangs the system
like before. IMHO the proper fix is to let resume allocate before it
touches the hardware ... I'll do that after the MTU series.
Florian, Justin: if you have a board where the WoL irq is actually
wired, I'd appreciate a run on it too.
Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de>
---
Changes in v3:
- Arm only the configured wake filters instead of turning HFB off (sashiko)
- Share that selection with the normal WoL suspend path
- Fix the clock wording in patch 1 (sashiko)
- Tested the WoL paths on a CM4, see above
- Link to v2: https://patch.msgid.link/20261019-nb-genet-fini-dma-net-v2-0-b85f6b92654a@tipi-net.de
Changes in v2:
- Squashed v1 patches 1 to 3 into one, each was either a no-op or left a
broken tree on its own
- Turn HFB off on the suspend early return, it stayed armed as a wake
source (sashiko)
- Second Fixes tag for the WoL hunks
- Let PHY_ERROR reach phy_stop() too (sashiko)
- Link to v1: https://patch.msgid.link/20261017-nb-genet-fini-dma-net-v1-0-47e7c57f6834@tipi-net.de
To: Doug Berger <opendmb@gmail.com>
To: Florian Fainelli <florian.fainelli@broadcom.com>
To: Nicolai Buchwitz <nb@tipi-net.de>
To: Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>
To: Andrew Lunn <andrew+netdev@lunn.ch>
To: "David S. Miller" <davem@davemloft.net>
To: Eric Dumazet <edumazet@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>
To: Paolo Abeni <pabeni@redhat.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
Nicolai Buchwitz (2):
net: bcmgenet: recover from a failed resume
net: bcmgenet: restore the Tx coalescing setting when the rings are rebuilt
drivers/net/ethernet/broadcom/genet/bcmgenet.c | 102 +++++++++++++++++--------
drivers/net/ethernet/broadcom/genet/bcmgenet.h | 1 +
2 files changed, 71 insertions(+), 32 deletions(-)
---
base-commit: 82e31923c0553fdbfcddcd910ca07952880ca9b9
change-id: 20261015-nb-genet-fini-dma-net-62a39ee14e65
Best regards,
--
Nicolai Buchwitz <nb@tipi-net.de>
Technical Details
Message-ID:
<20261022-nb-genet-fini-dma-net-v3-0-6e9fc89c0156@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-350437-linux-kernel-netdev=dewy.ruShow 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-350437-linux-kernel-netdev=dewy.ru From: nb@tipi-net.de (Nicolai Buchwitz) Newsgroups: linux.kernel.netdev Subject: [PATCH net v3 0/2] net: bcmgenet: fixes for a failed resume and the ring rebuild Date: Thu, 22 Oct 2026 10:54:05 +0200 Organization: Usenet Network Message-ID: <20261022-nb-genet-fini-dma-net-v3-0-6e9fc89c0156@tipi-net.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="169281"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:ve7s1plizpYM63FqLUXveQ0GxuM= sha256:R37382o8ffv/bfEgrKw9o0zl9M4gXAJGFYC0IDwhLbE= sha1:+5FBfVVq4BQgbqs+t7BRz0p64G0= sha256:op2EDzvQI3N2CVbJLKYbQyFaQwe8OzmPFuADvHx5nK0= 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 7205E1111DC; Thu, 22 Oct 2026 12:00:05 +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 KyH9-gS5_w66; Thu, 22 Oct 2026 12:00:01 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-350437-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 1194C1111E5; Thu, 22 Oct 2026 11:59:51 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id A18D6360CC; Thu, 22 Oct 2026 08:54:45 +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=1792659281; b=U9FMMqTZwQs+NkWHFqYgKOfuCiHVSHQig8tumFZZVMIby2NMrtsiBeXRLtzvMo5G/3/C r5M7oaY+ish7SpH/W8XZ/tjGfeATfi8NrSh82o6jsjOEDrUACQex1utzclfFhs+4Rbe4y nst9AEYZIelYn9dSgGL9ydSYzha8K7q5c8Tcn7YMjpIM7lwfcBpDq6Q3/O1ZbNMyA7nLt GnaBWdha/2pkUGAU61qWnq+/8pCQMWqUq/lVPOZCCkZFQlHeAAjHXUekssTQNgb7SsLfy IE78l2rHW7ImYfi8xAlwpayFk20AMS+QjFCsW2IcCyuADK602rTTLIl0daIDcoXJqPg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792659281; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:From: Subject:Date:Message-Id:X-Mailing-List:List-Id:List-Post:List-Help: List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Type:Content-Transfer-Encoding:X-B4-Tracking:X-Change-ID:To: Cc:X-Mailer:X-Last-TLS-Session-Version; bh=/AICmVWqfrMJ780GqvhcQ3Q9weXbT+oeNC4HrBmA/ww=; b=xi5uslEqlEhnbl5LdNrfWz3vaCUOZemG80vAKScEwNjNROTk+fYR4RjY4R7NV1JXvt8Q YprcW62a9H6FO4RIKu3bDihXnhy9uO2gp061h+RwLosrYk7GE5XJrQukE0cbICLE5r49i K9rarvlcD3YItMb4fagcJ/5CqF7SsWdOrvLIgHVqKBMl3GkeoKsqxohLZF7XoCqQEPo5s SXv5mbR1VJdJQpBy/uyHxVWI8qIuqZ3zVP0aAByyNE783e8rP3S2CcvwTorX7fJmJkNgc ZzfNH70tRAW255kprnevBj6HaNJ/IfhtdMVfu1oFKX7PXN+w/qoRSv7vGVQMGthpQeA== 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=EkOv9rqa; 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 7FFAD606A31B; Thu, 22 Oct 2026 08:54:41 +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=EkOv9rqa 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=1792659260; b=0zgLvnr7mpnHbOkiAiXjDYPKXOZ76fGJrebYlBiDFJmhH8mHHO+gLQGhM8HP26PswLuV xNElD5kpvTUe3Z4LHTXCY2K1KRqLc1aU+UgSpsBwlxeH3D+CQoGjHjOGL6jhIw2OEyL1X LdfOpOAE9OGWu1NOQ9p8WaqKQq1i69FqgKrGxIc3Y5/PV//bYbG6PPwX3Y7/duGYnZymN js/9OTFeC6wSEDIiUrTyDORWYv1NQn5obAS+YEKAbAsZUaa3Gyv1rjgrFsBsJIoPpERoB p+esLOcRI7sOvKao+3zNSV6G0KBKFxr7gk+NEIlJqGs4tOphG+tbVmszo4c7I/g7JIw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792659260; h=DMARC-Filter:Received:DKIM-Signature:From:Subject:Date:Message-Id: MIME-Version:Content-Type:Content-Transfer-Encoding:X-B4-Tracking: X-Change-ID:To:Cc:X-Mailer:X-Last-TLS-Session-Version; bh=/AICmVWqfrMJ780GqvhcQ3Q9weXbT+oeNC4HrBmA/ww=; b=G3nErz7ED9YCnx+h8Bh8DV8AAkAeARSm369AqxPwgiMu4gnvVEzoeed6jNif5zIt7cuM FUZEWJdiODlO+kh3oQuxnorwsVMUXERW+LXgAN0VRyELl6ZXRNgBscerK0WN226uZw5Lo VSWzinZYsNrGoNTu1EmTvWrY2IobHHlJWOZs3q3OYHXaX1dNw6iW+j7q3XyT9A6FX9OfW Uk0iDko6fnb9RPz8NBwaarU+a9Nqr8rINMSTnbo+lLGLz3HjOKJiH2karZeICaQBM5wzv 1EnBFE9fEdxcIgcMcuW2ZkQSkmvLzCpgXSZXxFmTepX6AXVcmAnoMPXKLZVao9OEjQg== 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=EkOv9rqa; 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 67AAA606A31A; Thu, 22 Oct 2026 08:54:17 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 67AAA606A31A 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 A91B3A0064; Thu, 22 Oct 2026 10:54:11 +0200 (CEST) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tipi-net.de; s=dkim; t=1792659255; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding; bh=/AICmVWqfrMJ780GqvhcQ3Q9weXbT+oeNC4HrBmA/ww=; b=EkOv9rqaQZa+ZUKmbPBKQkKDWCVlC6Ewg7nr3USCwpAZRj5Z+jzkOmkp2cj9ABawsvf36h 3uR9WStyGnPzq1yEfyo+QlF1U3Wxc/TUJoUFECma+VzblseTv2jkaguN1NojhAp2/MT0xO 8AFozERqVeOCb5uA4fDZyafvXiZ+6JiHUkmBTN2+kuR0PfMGXdURRaYiwzDy1SpGA64r1G bEe6Asx/JbHIZfCrrlfswPx61iGomw98vlZMutSPZbQTA8EASih74LTDP+oqv8Uvgzffj4 VAJQ1w61ikqzu2J2cM5IRDHKP/m0Rwso9TQb4hpyHkuXvbxJQEx/EDuf2/JXlQ== 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-B4-Tracking: v=1; b=H4sIAAAAAAAC/3WNyw6CMBBFf4V0bQ0tfYAr/8O4KDDAmFhIi0RD+ Hfb6kIXLO/MveesxIND8OSUrcTBgh5HG0JxyEgzGNsDxTZkwnOuWM4ktTXtwcJMO7RI27uhMSh uigqACVCShO3koMNn4l5IKJDr5+gf9Q2aORJjbUA/j+6V7AtL5a9I74gWRnMqNOhG6k6VhTjPO GF8HVtIloX/cqo9Dg+cupSdqiuupDD/nG3b3vwpFq4bAQAA X-Change-ID: 20261015-nb-genet-fini-dma-net-62a39ee14e65 X-Cc: Justin Chen <justin.chen@broadcom.com>, 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