summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMintz, Yuval <Yuval.Mintz@cavium.com>2017-03-14 15:26:00 +0200
committerDavid S. Miller <davem@davemloft.net>2017-03-14 11:37:05 -0700
commit752ecb2da11124a948567076b60767dc8034cfa5 (patch)
tree32bed2fca4567f562477a7d12081463a5b5db257
parent3ef310a7d99216e0fbdff29f0cb13bc54180373a (diff)
downloadlinux-752ecb2da11124a948567076b60767dc8034cfa5.tar.gz
linux-752ecb2da11124a948567076b60767dc8034cfa5.tar.bz2
linux-752ecb2da11124a948567076b60767dc8034cfa5.zip
qed: Fix mapping leak on LL2 rx flow
When receiving an Rx LL2 packet, qed fails to unmap the previous buffer. Fixes: 0a7fb11c23c0 ("qed: Add Light L2 support"); Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/qlogic/qed/qed_ll2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_ll2.c b/drivers/net/ethernet/qlogic/qed/qed_ll2.c
index 5fb34db377c8..29ae5ec2ac2d 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_ll2.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_ll2.c
@@ -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) {