netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net PATCH] octeon_ep: fix tx dma unmap len values in SG
@ 2023-09-11  9:23 Shinas Rasheed
  2023-09-11 18:01 ` Simon Horman
  0 siblings, 1 reply; 9+ messages in thread
From: Shinas Rasheed @ 2023-09-11  9:23 UTC (permalink / raw)
  To: netdev, linux-kernel, hgani
  Cc: vimleshk, mschmidt, egallen, Shinas Rasheed, Veerasenareddy Burru,
	Sathesh Edara, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Satananda Burla, Abhijit Ayarekar

Lengths of SG pointers are in big-endian

Fixes: 37d79d059606 ("octeon_ep: add Tx/Rx processing and interrupt support")
Signed-off-by: Shinas Rasheed <srasheed@marvell.com>
---
 drivers/net/ethernet/marvell/octeon_ep/octep_tx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_tx.c b/drivers/net/ethernet/marvell/octeon_ep/octep_tx.c
index 5a520d37bea0..7e99486c274b 100644
--- a/drivers/net/ethernet/marvell/octeon_ep/octep_tx.c
+++ b/drivers/net/ethernet/marvell/octeon_ep/octep_tx.c
@@ -69,12 +69,12 @@ int octep_iq_process_completions(struct octep_iq *iq, u16 budget)
 		compl_sg++;
 
 		dma_unmap_single(iq->dev, tx_buffer->sglist[0].dma_ptr[0],
-				 tx_buffer->sglist[0].len[0], DMA_TO_DEVICE);
+				 tx_buffer->sglist[0].len[3], DMA_TO_DEVICE);
 
 		i = 1; /* entry 0 is main skb, unmapped above */
 		while (frags--) {
 			dma_unmap_page(iq->dev, tx_buffer->sglist[i >> 2].dma_ptr[i & 3],
-				       tx_buffer->sglist[i >> 2].len[i & 3], DMA_TO_DEVICE);
+				       tx_buffer->sglist[i >> 2].len[3 - (i & 3)], DMA_TO_DEVICE);
 			i++;
 		}
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-09-15 13:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-11  9:23 [net PATCH] octeon_ep: fix tx dma unmap len values in SG Shinas Rasheed
2023-09-11 18:01 ` Simon Horman
2023-09-12  7:04   ` Shinas Rasheed
2023-09-12  8:45     ` Paolo Abeni
2023-09-13  5:49       ` [EXT] " Shinas Rasheed
2023-09-13  8:41         ` [net PATCH v2] " Shinas Rasheed
2023-09-14 10:57           ` Simon Horman
2023-09-15 13:00           ` patchwork-bot+netdevbpf
     [not found]   ` <PH0PR18MB473404EA35ADAC222C9EB68FC7F1A@PH0PR18MB4734.namprd18.prod.outlook.com>
2023-09-12 19:45     ` [EXT] Re: [net PATCH] " Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).