]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: xilinx: axienet: Fix RX skb ring management in DMAengine mode
authorSuraj Gupta <suraj.gupta2@amd.com>
Wed, 13 Aug 2025 13:55:59 +0000 (19:25 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:31:12 +0000 (16:31 +0200)
commit87c36bef9e0f56a17719b8f9dc23284eb77c80fd
tree83571e3e73cb18974a3d3f29d425f7b0fd5afd01
parent8d2bf2ec20a67cb49f12c84626e084b6c901ffc2
net: xilinx: axienet: Fix RX skb ring management in DMAengine mode

[ Upstream commit fd980bf6e9cdae885105685259421164f843ca55 ]

Submit multiple descriptors in axienet_rx_cb() to fill Rx skb ring. This
ensures the ring "catches up" on previously missed allocations.

Increment Rx skb ring head pointer after BD is successfully allocated.
Previously, head pointer was incremented before verifying if descriptor is
successfully allocated and has valid entries, which could lead to ring
state inconsistency if descriptor setup failed.

These changes improve reliability by maintaining adequate descriptor
availability and ensuring proper ring buffer state management.

Fixes: 6a91b846af85 ("net: axienet: Introduce dmaengine support")
Signed-off-by: Suraj Gupta <suraj.gupta2@amd.com>
Link: https://patch.msgid.link/20250813135559.1555652-1-suraj.gupta2@amd.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/xilinx/xilinx_axienet_main.c