diff options
author | Michal Simek <michal.simek@xilinx.com> | 2015-05-12 02:06:15 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-05-12 23:17:42 -0400 |
commit | 44d4f8d74e1dd07f248f35d74419f07d44f326e6 (patch) | |
tree | 9e24e178aebf436a2d10afc0063b3732808b7a58 /drivers/net/ethernet/xilinx | |
parent | 343f845b375989f1753f605902931fa939aa2223 (diff) |
net: ll_temac: Fix DMA map size bug
DMA allocates skb->len instead of headlen
which is used for DMA.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/xilinx')
-rw-r--r-- | drivers/net/ethernet/xilinx/ll_temac_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c b/drivers/net/ethernet/xilinx/ll_temac_main.c index 690a4c36b316..af2694dc6f90 100644 --- a/drivers/net/ethernet/xilinx/ll_temac_main.c +++ b/drivers/net/ethernet/xilinx/ll_temac_main.c | |||
@@ -707,8 +707,8 @@ static int temac_start_xmit(struct sk_buff *skb, struct net_device *ndev) | |||
707 | 707 | ||
708 | cur_p->app0 |= STS_CTRL_APP0_SOP; | 708 | cur_p->app0 |= STS_CTRL_APP0_SOP; |
709 | cur_p->len = skb_headlen(skb); | 709 | cur_p->len = skb_headlen(skb); |
710 | cur_p->phys = dma_map_single(ndev->dev.parent, skb->data, skb->len, | 710 | cur_p->phys = dma_map_single(ndev->dev.parent, skb->data, |
711 | DMA_TO_DEVICE); | 711 | skb_headlen(skb), DMA_TO_DEVICE); |
712 | cur_p->app4 = (unsigned long)skb; | 712 | cur_p->app4 = (unsigned long)skb; |
713 | 713 | ||
714 | for (ii = 0; ii < num_frag; ii++) { | 714 | for (ii = 0; ii < num_frag; ii++) { |