]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
net: axienet: Factor out TX descriptor chain cleanup
authorAndre Przywara <andre.przywara@arm.com>
Tue, 24 Mar 2020 13:23:39 +0000 (13:23 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 24 Mar 2020 23:33:04 +0000 (16:33 -0700)
commitab365c3393664f32116aa22fe322cb04a93fab31
treee23a1895d462d3bda1fe8bd47ba703960164832e
parente7fea0b9d09e2f7d32776f5198192dfc2572a5b9
net: axienet: Factor out TX descriptor chain cleanup

Factor out the code that cleans up a number of connected TX descriptors,
as we will need it to properly roll back a failed _xmit() call.
There are subtle differences between cleaning up a successfully sent
chain (unknown number of involved descriptors, total data size needed)
and a chain that was about to set up (number of descriptors known), so
cater for those variations with some extra parameters.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/xilinx/xilinx_axienet_main.c