Skip to content

Commit

Permalink
mlx4_core: Use the right function to free eq->page_list entries
Browse files Browse the repository at this point in the history
Fix the memory release function to be consistent with the memory
allocation one to prevent problems if the implementation of
pci_free_consistent() and dma_free_coherent() are different.

Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
Reviewed-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <roland@purestorage.com>
  • Loading branch information
Dotan Barak authored and Roland Dreier committed Oct 6, 2011
1 parent 0f6740c commit a8dc0df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/mlx4/eq.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ static void mlx4_free_eq(struct mlx4_dev *dev,

mlx4_mtt_cleanup(dev, &eq->mtt);
for (i = 0; i < npages; ++i)
pci_free_consistent(dev->pdev, PAGE_SIZE,
dma_free_coherent(&dev->pdev->dev, PAGE_SIZE,
eq->page_list[i].buf,
eq->page_list[i].map);

Expand Down

0 comments on commit a8dc0df

Please sign in to comment.