]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
mlx4_core: Use the right function to free eq->page_list entries
authorDotan Barak <dotanb@dev.mellanox.co.il>
Thu, 6 Oct 2011 16:33:12 +0000 (09:33 -0700)
committerRoland Dreier <roland@purestorage.com>
Thu, 6 Oct 2011 16:33:12 +0000 (09:33 -0700)
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>
drivers/net/mlx4/eq.c

index 1ad1f6029af80a3fd84dd0071fbdefb57de2892a..869a2c220a7b4b7c6b727a1696ea94070edab334 100644 (file)
@@ -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);