octeon_ep: fix tx dma unmap len values in SG
authorShinas Rasheed <srasheed@marvell.com>
Wed, 13 Sep 2023 08:41:56 +0000 (01:41 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Sep 2023 12:50:52 +0000 (13:50 +0100)
commit350db8a59eb392bf42e62b6b2a37d56b5833012b
treef9a0ec6685ed5a1459685d494da76392368a1390
parente0b65f9b81fef180cf5f103adecbe5505c961153
octeon_ep: fix tx dma unmap len values in SG

Lengths of SG pointers are kept in the following order in
the SG entries in hardware.
 63      48|47     32|31     16|15       0
 -----------------------------------------
 |  Len 0  |  Len 1  |  Len 2  |  Len 3  |
 -----------------------------------------
 |                Ptr 0                  |
 -----------------------------------------
 |                Ptr 1                  |
 -----------------------------------------
 |                Ptr 2                  |
 -----------------------------------------
 |                Ptr 3                  |
 -----------------------------------------
Dma pointers have to be unmapped based on their
respective lengths given in this format.

Fixes: 37d79d059606 ("octeon_ep: add Tx/Rx processing and interrupt support")
Signed-off-by: Shinas Rasheed <srasheed@marvell.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/octeon_ep/octep_main.c
drivers/net/ethernet/marvell/octeon_ep/octep_tx.c
drivers/net/ethernet/marvell/octeon_ep/octep_tx.h