Skip to contentSkip to conversation

dwc_eth_qos: Fix dma address for multi-fragment skbs

PATCH In review Lars Persson 2 participants 2 messages Jan 12, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dwc_eth_qos: Fix dma address for multi-fragment skbs

The offset inside the fragment was not used for the dma address and silent data corruption resulted because TSO makes the checksum match.

Fixes 077742dac2c7 ("dwc_eth_qos: Add support for Synopsys DWC Ethernet QoS")
---
 drivers/net/ethernet/synopsys/dwc_eth_qos.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/synopsys/dwc_eth_qos.c +1 -1
index 9066d7a..f96c6b3 100644
@@ -2107,7 +2107,7 @@ static int dwceqos_tx_frags(struct sk_buff *skb, struct net_local *lp,
 			dd = &lp->tx_descs[lp->tx_next];
 
 			/* Set DMA Descriptor fields */
-			dd->des0 = dma_handle;
+			dd->des0 = dma_handle + consumed_size;
 			dd->des1 = 0;
 			dd->des2 = dma_size;
 
Signature · 1 line
2.1.4
maintainer
#1 lore raw

From: Lars Persson <[email protected]>
Date: Tue, 12 Jan 2016 15:28:13 +0100

Quoted 5 lines

The offset inside the fragment was not used for the dma address and silent data corruption resulted because TSO makes the checksum match.

Fixes 077742dac2c7 ("dwc_eth_qos: Add support for Synopsys DWC Ethernet QoS")

Applied and queued up for -stable, thanks.