net: mvneta: fix transmit path dma-unmapping on error
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Wed, 10 May 2023 10:15:42 +0000 (11:15 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 11 May 2023 11:05:07 +0000 (13:05 +0200)
commitfef99e840d465bad6549dd8775a5f967a711d171
treec8fb61a4125ef02e02c3c6d4935f798e458a14d5
parentccce324dabfe2143519daf50ed8b1ef1d0c542f7
net: mvneta: fix transmit path dma-unmapping on error

The transmit code assumes that the transmit descriptors that are used
begin with the first descriptor in the ring, but this may not be the
case. Fix this by providing a new function that dma-unmaps a range of
numbered descriptor entries, and use that to do the unmapping.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/marvell/mvneta.c