From patchwork Fri Nov 6 03:09:23 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yevgeny Petrilin X-Patchwork-Id: 57958 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nA60Bt90027542 for ; Fri, 6 Nov 2009 00:11:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759184AbZKFALt (ORCPT ); Thu, 5 Nov 2009 19:11:49 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1759186AbZKFALs (ORCPT ); Thu, 5 Nov 2009 19:11:48 -0500 Received: from mail.mellanox.co.il ([194.90.237.43]:43169 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1759183AbZKFALr (ORCPT ); Thu, 5 Nov 2009 19:11:47 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from yevgenyp@mellanox.co.il) with SMTP; 6 Nov 2009 02:17:39 +0200 Received: from [10.4.12.75] ([10.4.12.75]) by mtlexch01.mtl.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 6 Nov 2009 02:11:51 +0200 Message-ID: <4AF39363.6050405@mellanox.co.il> Date: Fri, 06 Nov 2009 05:09:23 +0200 From: Yevgeny Petrilin User-Agent: Thunderbird 2.0.0.23 (X11/20090812) MIME-Version: 1.0 To: rdreier@cisco.com CC: linux-rdma@vger.kernel.org, netdev@vger.kernel.org, liranl@mellanox.co.il, tziporet@mellanox.co.il, yevgenyp@mellanox.co.il Subject: [PATCH 13/25 v2] mlx4_core: remove unused driver/kernel uar (kar) X-OriginalArrivalTime: 06 Nov 2009 00:11:51.0642 (UTC) FILETIME=[BD77F3A0:01CA5E75] Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c index 4edc8d7..d8143c6 100644 --- a/drivers/net/mlx4/main.c +++ b/drivers/net/mlx4/main.c @@ -883,26 +883,11 @@ static int mlx4_setup_hca(struct mlx4_dev *dev) return err; } - err = mlx4_uar_alloc(dev, &priv->driver_uar); - if (err) { - mlx4_err(dev, "Failed to allocate driver access region, " - "aborting.\n"); - goto err_uar_table_free; - } - - priv->kar = ioremap(priv->driver_uar.pfn << PAGE_SHIFT, PAGE_SIZE); - if (!priv->kar) { - mlx4_err(dev, "Couldn't map kernel access region, " - "aborting.\n"); - err = -ENOMEM; - goto err_uar_free; - } - err = mlx4_init_pd_table(dev); if (err) { mlx4_err(dev, "Failed to initialize " "protection domain table, aborting.\n"); - goto err_kar_unmap; + goto err_uar_table_free; } err = mlx4_init_mr_table(dev); @@ -1015,12 +1000,6 @@ err_mr_table_free: err_pd_table_free: mlx4_cleanup_pd_table(dev); -err_kar_unmap: - iounmap(priv->kar); - -err_uar_free: - mlx4_uar_free(dev, &priv->driver_uar); - err_uar_table_free: mlx4_cleanup_uar_table(dev); return err; @@ -1316,8 +1295,6 @@ static void mlx4_remove_one(struct pci_dev *pdev) mlx4_cleanup_mr_table(dev); mlx4_cleanup_pd_table(dev); - iounmap(priv->kar); - mlx4_uar_free(dev, &priv->driver_uar); mlx4_cleanup_uar_table(dev); mlx4_free_eq_table(dev); mlx4_close_hca(dev); diff --git a/drivers/net/mlx4/mlx4.h b/drivers/net/mlx4/mlx4.h index 0686856..f0afbb6 100644 --- a/drivers/net/mlx4/mlx4.h +++ b/drivers/net/mlx4/mlx4.h @@ -401,8 +401,6 @@ struct mlx4_priv { void __iomem *clr_base; - struct mlx4_uar driver_uar; - void __iomem *kar; struct mlx4_port_info port[MLX4_MAX_PORTS + 1]; struct mlx4_sense sense; struct mutex port_mutex;