aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryuqi jin <[email protected]>2019-10-21 11:27:34 +0800
committerJakub Kicinski <[email protected]>2019-10-22 13:04:16 -0700
commit34c15202896d11e3974788daf9005a84ec45f7a2 (patch)
tree657e3b7fd8643b5e2e303a0982cfe8a00464b3a7
parent011c7289de619d76f82b0d9e9fec3f59d2fe57f7 (diff)
net: stmmac: Fix the problem of tso_xmit
When the address width of DMA is greater than 32, the packet header occupies a BD descriptor. The starting address of the data should be added to the header length. Fixes: a993db88d17d ("net: stmmac: Enable support for > 32 Bits addressing in XGMAC") Cc: Eric Dumazet <[email protected]> Cc: Giuseppe Cavallaro <[email protected]> Cc: Alexandre Torgue <[email protected]> Cc: Jose Abreu <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Maxime Coquelin <[email protected]> Signed-off-by: yuqi jin <[email protected]> Signed-off-by: Shaokun Zhang <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 3dfd04e0506a..4e9c848c67cc 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2995,6 +2995,7 @@ static netdev_tx_t stmmac_tso_xmit(struct sk_buff *skb, struct net_device *dev)
} else {
stmmac_set_desc_addr(priv, first, des);
tmp_pay_len = pay_len;
+ des += proto_hdr_len;
}
stmmac_tso_allocator(priv, des, tmp_pay_len, (nfrags == 0), queue);