Skip to content

Commit

Permalink
mlx4_en: Fixed incorrect unmapping on RX flow.
Browse files Browse the repository at this point in the history
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: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Yevgeny Petrilin authored and David S. Miller committed Aug 24, 2010
1 parent c2e3143 commit 69351a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/mlx4/en_rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ static int mlx4_en_complete_rx_desc(struct mlx4_en_priv *priv,
goto fail;

/* 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);
}
/* Adjust size of last fragment to match actual length */
Expand Down

0 comments on commit 69351a2

Please sign in to comment.