From: Zhang Hewei <redacted>
The FDMA RX path on both sparx5 and its lan969x sibling stalls the RX
ring forever when the hardware delivers a frame whose source port does
not map to an active netdev: the inactive-port error branch in both
drivers leaves the FDMA software cursor untouched, while the DCB keeps
its hardware DONE bit - so every following NAPI poll picks the same
DCB again and RX traffic stalls on all ports until the module is
reloaded.
Patch 1 treats a bogus frame on sparx5 as consumed (free the skb, clear
the array slot, return true). Patch 2 unifies the NULL semantics on
lan969x: NULL always means "frame dropped, page recycled" (inactive
port or failed build_skb()), and the poll loop advances past such a DB
like it does for any other frame.
v5: add the testing status to the commit messages as requested for fix
series (patch 1 not tested - no hardware available; patch 2's
drop-and-advance form was verified on lan969x hardware by Daniel Machon
during review). No functional change since v4.
v4 lore link:
https://lore.kernel.org/netdev/20261113122429.26163-1-memoriaru@foxmail.com/
Found by code inspection; the stall needs the hardware to emit a frame
with an invalid source port, which cannot be triggered without hardware.
Review from someone with access to sparx5/lan969x systems would be
appreciated.
Zhang Hewei (2):
net: sparx5: fix RX ring stall on frames from inactive ports
net: lan969x: fix RX ring stall on frames from inactive ports
.../microchip/sparx5/lan969x/lan969x_fdma.c | 14 ++++++++------
.../net/ethernet/microchip/sparx5/sparx5_fdma.c | 8 +++++---
2 files changed, 13 insertions(+), 9 deletions(-)
--
2.39.5 (Apple Git-154)