[PATCH net] dwc_eth_qos: Fix dma address for multi-fragment skbs

Subsystems: networking drivers, synopsys designware enterprise ethernet driver, the rest

STALE3891d

2 messages, 2 authors, 2016-01-12 · open the first message on its own page

[PATCH net] dwc_eth_qos: Fix dma address for multi-fragment skbs

From: Lars Persson <lars.persson@axis.com>
Date: 2016-01-12 14:28:31

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")
Signed-off-by: Lars Persson <redacted>
---
 drivers/net/ethernet/synopsys/dwc_eth_qos.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/synopsys/dwc_eth_qos.c b/drivers/net/ethernet/synopsys/dwc_eth_qos.c
index 9066d7a..f96c6b3 100644
--- a/drivers/net/ethernet/synopsys/dwc_eth_qos.c
+++ b/drivers/net/ethernet/synopsys/dwc_eth_qos.c
@@ -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;
 
-- 
2.1.4

Re: [PATCH net] dwc_eth_qos: Fix dma address for multi-fragment skbs

From: David Miller <davem@davemloft.net>
Date: 2016-01-12 20:32:18

From: Lars Persson <lars.persson@axis.com>
Date: Tue, 12 Jan 2016 15:28:13 +0100
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")
Signed-off-by: Lars Persson <redacted>
Applied and queued up for -stable, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help