Skip to content

Commit

Permalink
net: macb: Pass same size to DMA_UNMAP as used for DMA_MAP
Browse files Browse the repository at this point in the history
Just as commit "net: macb: DMA-unmap full rx-buffer"
(48330e0), pass the size that
was used for mapping the memory also to the unmap routine to
avoid warnings from the DMA_API.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Soren Brinkmann authored and David S. Miller committed May 5, 2014
1 parent e96f2e7 commit ccd6d0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/cadence/macb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,7 @@ static void gem_free_rx_buffers(struct macb *bp)

desc = &bp->rx_ring[i];
addr = MACB_BF(RX_WADDR, MACB_BFEXT(RX_WADDR, desc->addr));
dma_unmap_single(&bp->pdev->dev, addr, skb->len,
dma_unmap_single(&bp->pdev->dev, addr, bp->rx_buffer_size,
DMA_FROM_DEVICE);
dev_kfree_skb_any(skb);
skb = NULL;
Expand Down

0 comments on commit ccd6d0a

Please sign in to comment.