Netdev List
 help / color / mirror / Atom feed
* [PATCH net 0/4] net: bcmgenet: fixes for a failed resume and the ring rebuild
@ 2026-10-17 11:59 Nicolai Buchwitz
  2026-10-17 11:59 ` [PATCH net 1/4] net: bcmgenet: stop the PHY when a WoL resume rebuilds the datapath Nicolai Buchwitz
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Nicolai Buchwitz @ 2026-10-17 11:59 UTC (permalink / raw)
  To: Doug Berger, Florian Fainelli,
	Broadcom internal kernel review list, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: Florian Fainelli, netdev, linux-kernel, Nicolai Buchwitz

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>


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-10-19  7:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-17 11:59 [PATCH net 0/4] net: bcmgenet: fixes for a failed resume and the ring rebuild Nicolai Buchwitz
2026-10-17 11:59 ` [PATCH net 1/4] net: bcmgenet: stop the PHY when a WoL resume rebuilds the datapath Nicolai Buchwitz
2026-10-18 12:02   ` netdev-bot+sashiko
2026-10-19  7:07     ` Nicolai Buchwitz
2026-10-17 11:59 ` [PATCH net 2/4] net: bcmgenet: do not tear the datapath down twice after a failed resume Nicolai Buchwitz
2026-10-18 12:02   ` netdev-bot+sashiko
2026-10-17 11:59 ` [PATCH net 3/4] net: bcmgenet: let the interface be reopened " Nicolai Buchwitz
2026-10-17 11:59 ` [PATCH net 4/4] net: bcmgenet: restore the Tx coalescing setting when the rings are rebuilt Nicolai Buchwitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox