Skip to content

Commit

Permalink
qed: Fix mapping leak on LL2 rx flow
Browse files Browse the repository at this point in the history
When receiving an Rx LL2 packet, qed fails to unmap the previous buffer.

Fixes: 0a7fb11 ("qed: Add Light L2 support");
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Mintz, Yuval authored and David S. Miller committed Mar 14, 2017
1 parent 3ef310a commit 752ecb2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/qlogic/qed/qed_ll2.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ static void qed_ll2b_complete_rx_packet(struct qed_hwfn *p_hwfn,
/* If need to reuse or there's no replacement buffer, repost this */
if (rc)
goto out_post;
dma_unmap_single(&cdev->pdev->dev, buffer->phys_addr,
cdev->ll2->rx_size, DMA_FROM_DEVICE);

skb = build_skb(buffer->data, 0);
if (!skb) {
Expand Down

0 comments on commit 752ecb2

Please sign in to comment.