public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mlx4: Fix the release func to be consistent with the allocation one
@ 2011-07-28  7:59 Dotan Barak
       [not found] ` <201107281059.50171.dotanb-g2bIKuvJtcQanlnWow0HJg@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Dotan Barak @ 2011-07-28  7:59 UTC (permalink / raw)
  To: roland-DgEjT+Ai2ygdnm+yROfE0A
  Cc: linux-rdma (linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)

Fix the memory release function to be consistent with the memory allocation one
to prevent problems where the implementation of pci_free_consistent and
dma_free_coherent are different.

Signed-off-by: Dotan Barak <dotanb-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
Reviewed-by: Eli Cohen <eli-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>

---

diff --git a/drivers/net/mlx4/eq.c b/drivers/net/mlx4/eq.c
index 7aecc34..31177ce 100644
--- a/drivers/net/mlx4/eq.c
+++ b/drivers/net/mlx4/eq.c
@@ -489,7 +489,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);
 
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mlx4: Fix the release func to be consistent with the allocation one
       [not found] ` <201107281059.50171.dotanb-g2bIKuvJtcQanlnWow0HJg@public.gmane.org>
@ 2011-09-20 16:09   ` Roland Dreier
  0 siblings, 0 replies; 2+ messages in thread
From: Roland Dreier @ 2011-09-20 16:09 UTC (permalink / raw)
  To: Dotan Barak
  Cc: linux-rdma (linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)

Thanks, applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-09-20 16:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-28  7:59 [PATCH] mlx4: Fix the release func to be consistent with the allocation one Dotan Barak
     [not found] ` <201107281059.50171.dotanb-g2bIKuvJtcQanlnWow0HJg@public.gmane.org>
2011-09-20 16:09   ` Roland Dreier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox