]> 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:34:44 +0000 (16:34 +0200)
commit59431eb72bb07d43fcecd9f10b4a223751ffbedc
tree6051e345fa027e1219674b8d2be17974d39722bd
parentfee345385d8e65203a0f17393708556997d9781b
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