From patchwork Thu Jul 28 07:59:49 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dotan Barak X-Patchwork-Id: 1014662 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6S7xudH010740 for ; Thu, 28 Jul 2011 07:59:57 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754961Ab1G1H7z (ORCPT ); Thu, 28 Jul 2011 03:59:55 -0400 Received: from mail-ww0-f44.google.com ([74.125.82.44]:54932 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754880Ab1G1H7z (ORCPT ); Thu, 28 Jul 2011 03:59:55 -0400 Received: by wwe5 with SMTP id 5so2197453wwe.1 for ; Thu, 28 Jul 2011 00:59:54 -0700 (PDT) Received: by 10.227.42.30 with SMTP id q30mr7287696wbe.6.1311839994011; Thu, 28 Jul 2011 00:59:54 -0700 (PDT) Received: from vnc11.lab.mtl.com ([82.166.227.17]) by mx.google.com with ESMTPS id fo2sm592740wbb.65.2011.07.28.00.59.52 (version=SSLv3 cipher=OTHER); Thu, 28 Jul 2011 00:59:53 -0700 (PDT) From: Dotan Barak To: roland@kernel.org Subject: [PATCH] mlx4: Fix the release func to be consistent with the allocation one Date: Thu, 28 Jul 2011 10:59:49 +0300 User-Agent: KMail/1.9.4 Cc: "linux-rdma (linux-rdma@vger.kernel.org)" MIME-Version: 1.0 Content-Disposition: inline Message-Id: <201107281059.50171.dotanb@sw.voltaire.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 28 Jul 2011 07:59:57 +0000 (UTC) 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 Reviewed-by: Eli Cohen --- -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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);