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

From: Nicolai Buchwitz

Date: Sat Oct 17 2026 - 08:01:23 EST


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@xxxxxxxxxxx

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@xxxxxxxxxxx>
---
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@xxxxxxxxxxx>