]> git.baikalelectronics.ru Git - kernel.git/commit
net: bcmgenet: fix dma api length mismatch
authorEric Dumazet <edumazet@google.com>
Thu, 17 Mar 2016 18:57:06 +0000 (11:57 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 19 Mar 2016 03:12:44 +0000 (23:12 -0400)
commitab44b75e6b4781c5a76223c5e778f2b65b3b7c21
treedc5bc8b326f427470c2903d2c57ba6203753e441
parent0c5201ab8a44843005f3fab8f41396d517197462
net: bcmgenet: fix dma api length mismatch

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: 390dff99da87 ("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>
drivers/net/ethernet/broadcom/genet/bcmgenet.c