net: airoha: Fix page recycling in airoha_qdma_rx_process()
authorLorenzo Bianconi <lorenzo@kernel.org>
Thu, 15 May 2025 06:33:06 +0000 (08:33 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 16 May 2025 23:35:45 +0000 (16:35 -0700)
commitd6d2b0e1538d5c381ec0ca95afaf772c096ea5dc
treee027645cbcc4f0d7c78e84a341645a93ed055141
parent43f0999af011fba646e015f0bb08b6c3002a0170
net: airoha: Fix page recycling in airoha_qdma_rx_process()

Do not recycle the page twice in airoha_qdma_rx_process routine in case
of error. Just run dev_kfree_skb() if the skb has been allocated and marked
for recycling. Run page_pool_put_full_page() directly if the skb has not
been allocated yet.
Moreover, rely on DMA address from queue entry element instead of reading
it from the DMA descriptor for DMA syncing in airoha_qdma_rx_process().

Fixes: e12182ddb6e71 ("net: airoha: Enable Rx Scatter-Gather")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/20250515-airoha-fix-rx-process-error-condition-v2-1-657e92c894b9@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/airoha/airoha_eth.c