summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/xilinx
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2015-05-12 08:06:15 +0200
committerDavid S. Miller <davem@davemloft.net>2015-05-12 23:17:42 -0400
commit44d4f8d74e1dd07f248f35d74419f07d44f326e6 (patch)
tree9e24e178aebf436a2d10afc0063b3732808b7a58 /drivers/net/ethernet/xilinx
parent343f845b375989f1753f605902931fa939aa2223 (diff)
downloadlinux-44d4f8d74e1dd07f248f35d74419f07d44f326e6.tar.bz2
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.c4
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)
cur_p->app0 |= STS_CTRL_APP0_SOP;
cur_p->len = skb_headlen(skb);
- cur_p->phys = dma_map_single(ndev->dev.parent, skb->data, skb->len,
- DMA_TO_DEVICE);
+ cur_p->phys = dma_map_single(ndev->dev.parent, skb->data,
+ skb_headlen(skb), DMA_TO_DEVICE);
cur_p->app4 = (unsigned long)skb;
for (ii = 0; ii < num_frag; ii++) {