Skip to content

Commit ccd6d0a

Browse files
sorenb-xlnxdavem330
authored andcommitted
net: macb: Pass same size to DMA_UNMAP as used for DMA_MAP
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent e96f2e7 commit ccd6d0a

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/ethernet/cadence

1 file changed

+1
-1
lines changed

drivers/net/ethernet/cadence/macb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1113,7 +1113,7 @@ static void gem_free_rx_buffers(struct macb *bp)
11131113

11141114
desc = &bp->rx_ring[i];
11151115
addr = MACB_BF(RX_WADDR, MACB_BFEXT(RX_WADDR, desc->addr));
1116-
dma_unmap_single(&bp->pdev->dev, addr, skb->len,
1116+
dma_unmap_single(&bp->pdev->dev, addr, bp->rx_buffer_size,
11171117
DMA_FROM_DEVICE);
11181118
dev_kfree_skb_any(skb);
11191119
skb = NULL;

0 commit comments

Comments
 (0)