Commit 69351a29 authored by Yevgeny Petrilin's avatar Yevgeny Petrilin Committed by David S. Miller

mlx4_en: Fixed incorrect unmapping on RX flow.

When allocating new fragments to replace the ones that would be passed to the stack,
The fragments that should be replaced, are the ones that were already used.
Signed-off-by: default avatarYevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c2e3143e
...@@ -459,7 +459,7 @@ static int mlx4_en_complete_rx_desc(struct mlx4_en_priv *priv, ...@@ -459,7 +459,7 @@ static int mlx4_en_complete_rx_desc(struct mlx4_en_priv *priv,
goto fail; goto fail;
/* Unmap buffer */ /* Unmap buffer */
pci_unmap_single(mdev->pdev, dma, skb_frags[nr].size, pci_unmap_single(mdev->pdev, dma, skb_frags_rx[nr].size,
PCI_DMA_FROMDEVICE); PCI_DMA_FROMDEVICE);
} }
/* Adjust size of last fragment to match actual length */ /* Adjust size of last fragment to match actual length */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment