]> git.baikalelectronics.ru Git - 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)
commitc080a546397c53ed88ff5f8612f450b14cab0024
treee23a1895d462d3bda1fe8bd47ba703960164832e
parent8f29cf4ea9695254339f01c97a9a68a9a0307ed6
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