net: bcmgenet: fix dma api length mismatch
authorEric Dumazet <edumazet@google.com>
Thu, 17 Mar 2016 18:57:06 +0000 (11:57 -0700)
committerSasha Levin <sasha.levin@oracle.com>
Tue, 12 Jul 2016 12:47:39 +0000 (08:47 -0400)
commita3f7e4c7d076bc417fbc4ec76eca7fcb13b01d73
tree6307be7d4dca3f707b396feca86e72e58711a0cd
parenta10d14a2a60f153b8ee500062c0a4da9f9293a6f
net: bcmgenet: fix dma api length mismatch

[ Upstream commit eee577232203842b4dcadb7ab477a298479633ed ]

When un-mapping skb->data in __bcmgenet_tx_reclaim(),
we must use the length that was used in original dma_map_single(),
instead of skb->len that might be bigger (includes the frags)

We simply can store skb_len into tx_cb_ptr->dma_len and use it
at unmap time.

Fixes: 1c1008c793fa ("net: bcmgenet: add main driver file")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/net/ethernet/broadcom/genet/bcmgenet.c