qed: Fix mapping leak on LL2 rx flow
When receiving an Rx LL2 packet, qed fails to unmap the previous buffer.
Fixes: 0a7fb11c23 ("qed: Add Light L2 support");
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
3ef310a7d9
commit
752ecb2da1
@@ -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 need to reuse or there's no replacement buffer, repost this */
|
||||||
if (rc)
|
if (rc)
|
||||||
goto out_post;
|
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);
|
skb = build_skb(buffer->data, 0);
|
||||||
if (!skb) {
|
if (!skb) {
|
||||||
|
|||||||
Reference in New Issue
Block a user