Message ID | 561A64E9.1070906@mellanox.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show
Return-Path: <linux-rdma-owner@kernel.org> X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6FAC29F1D5 for <patchwork-linux-rdma@patchwork.kernel.org>; Sun, 11 Oct 2015 13:32:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1241520623 for <patchwork-linux-rdma@patchwork.kernel.org>; Sun, 11 Oct 2015 13:32:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C7644203F3 for <patchwork-linux-rdma@patchwork.kernel.org>; Sun, 11 Oct 2015 13:32:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752105AbbJKNcg (ORCPT <rfc822;patchwork-linux-rdma@patchwork.kernel.org>); Sun, 11 Oct 2015 09:32:36 -0400 Received: from mail-am1on0085.outbound.protection.outlook.com ([157.56.112.85]:36672 "EHLO emea01-am1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751606AbbJKNce (ORCPT <rfc822;linux-rdma@vger.kernel.org>); Sun, 11 Oct 2015 09:32:34 -0400 Received: from DB3PR05CA0019.eurprd05.prod.outlook.com (10.160.41.147) by DB4PR05MB367.eurprd05.prod.outlook.com (10.242.192.149) with Microsoft SMTP Server (TLS) id 15.1.293.16; Sun, 11 Oct 2015 13:32:30 +0000 Received: from AM1FFO11FD007.protection.gbl (2a01:111:f400:7e00::162) by DB3PR05CA0019.outlook.office365.com (2a01:111:e400:9428::19) with Microsoft SMTP Server (TLS) id 15.1.293.16 via Frontend Transport; Sun, 11 Oct 2015 13:32:30 +0000 Authentication-Results: spf=pass (sender IP is 193.47.165.134) smtp.mailfrom=mellanox.com; Avagotech.com; dkim=none (message not signed) header.d=none; Avagotech.com; dmarc=pass action=none header.from=mellanox.com; Received-SPF: Pass (protection.outlook.com: domain of mellanox.com designates 193.47.165.134 as permitted sender) receiver=protection.outlook.com; client-ip=193.47.165.134; helo=mtlcas13.mtl.com; Received: from mtlcas13.mtl.com (193.47.165.134) by AM1FFO11FD007.mail.protection.outlook.com (10.174.64.69) with Microsoft SMTP Server (TLS) id 15.1.293.9 via Frontend Transport; Sun, 11 Oct 2015 13:32:28 +0000 Received: from MTLCAS13.mtl.com (10.0.8.78) by mtlcas13.mtl.com (10.0.8.78) with Microsoft SMTP Server (TLS) id 15.0.775.38; Sun, 11 Oct 2015 16:32:27 +0300 Received: from MTLCAS01.mtl.com (10.0.8.71) by MTLCAS13.mtl.com (10.0.8.78) with Microsoft SMTP Server (TLS) id 15.0.775.38 via Frontend Transport; Sun, 11 Oct 2015 16:32:27 +0300 Received: from [10.223.0.82] (10.223.0.82) by MTLCAS01.mtl.com (10.0.8.71) with Microsoft SMTP Server (TLS) id 14.3.123.3; Sun, 11 Oct 2015 16:32:26 +0300 Subject: Re: [PATCH for-next 02/10] IB/mlx5: Support IB device's callback for getting its netdev To: Achiad Shochat <achiad@mellanox.com>, Doug Ledford <dledford@redhat.com> References: <1440089189-3361-1-git-send-email-achiad@mellanox.com> <1440089189-3361-3-git-send-email-achiad@mellanox.com> CC: <linux-rdma@vger.kernel.org>, Jason Gunthorpe <jgunthorpe@obsidianresearch.com>, Or Gerlitz <ogerlitz@mellanox.com>, Haggai Eran <haggaie@mellanox.com>, Somnath Kotur <Somnath.Kotur@Avagotech.com> From: Matan Barak <matanb@mellanox.com> Message-ID: <561A64E9.1070906@mellanox.com> Date: Sun, 11 Oct 2015 16:32:25 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1440089189-3361-3-git-send-email-achiad@mellanox.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.223.0.82] X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; AM1FFO11FD007; 1:rXluyJLG8Gd9vHvokNzeGkyElrhZ7YebShhryJE1GiPevW3b9Q+xGYRO0IDrWrh8bXf7mpi/raeVka2Ra69SQIu/GqKVJSrH8wI1DtqUmyhdH36zUNXQ7oJQlmCax7vy9grC+JLQUyYedIRKEsgvv4aNwHxU5KQYrDESsX3yMaAV97IpsJ95SxrL+eAPi9h2OdX3LUp6DQRO1w1ukUmKiYKGHoOWAo1GiL0I0VL5VUa37XRXCYs4+kjT1UvhYfUSeE3kDS4ftwIriTZzqdTcSrN54japBah5wXmU4KiasHhFrl+lfQ6YY5Ke/UNhSfRbS+rzpPSXVZ/d6iPylWlBQ72jA0SvWNeTlvgJYWmfE8jqXgytZSsm9Ffw+5PmYmNKDh7j1j6odvT1PTRgOtetNw== X-Forefront-Antispam-Report: CIP:193.47.165.134; CTRY:IL; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(438002)(479174004)(164054003)(377454003)(199003)(24454002)(189002)(64126003)(50466002)(47776003)(65956001)(59896002)(189998001)(5007970100001)(64706001)(92566002)(5004730100002)(5008740100001)(2950100001)(46102003)(50986999)(87936001)(54356999)(6806005)(97736004)(83506001)(65816999)(23746002)(65806001)(86362001)(4001350100001)(5001770100001)(33656002)(19580395003)(19580405001)(80316001)(106466001)(77096005)(87266999)(11100500001)(36756003)(76176999)(3940600001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB4PR05MB367; H:mtlcas13.mtl.com; FPR:; SPF:Pass; PTR:ErrorRetry; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DB4PR05MB367; 2:ugwZvf1T36hyOZ8eFsA3sN9wDExY1LfBU3lZI1JJLzefF5DBE/94WhriCBrDaOsaYpoAb87AwBOL9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THWbJRddMaAIhvvQ1ekTsH9H2d33ZT0o8kxnO5N6GjwcSSLcoOn9RY3875ZlE7dNwmmsm/W6LXl+COux5tnD7A8MqFYEhSm4p8g6brfARDHvZCqFm3Tq2AVMeAGi8It5eNvwSRYmkCy9MZ5sFOq9GlHWIHULZGlh7NKRsdKHiK5Qhz8j8LSTvsgeXQuz87/9glP; 4:j4mtCQ1wT6lETt5FmLD2kkFHRGEDWMQk5cDyn9i3oPnG9ycvv68AqApabGN75ljtgeWmGfn+RcudAijSj67e7GS3Fglp7R0MfZb74H8NYAuoCobtz57uL/GEOdKdNcA15IiGLWhTafKI71ibhm9RYH/D970b4pJ2uCcVuuI83MJ6eugVktNBP5LPcZmrde0+wiPcRcNkf2qtUW6PSuuQWfX2pCaMcE0Jb0kwMb+qM0kfR1pLVkgFGFprr275fe8TBs7RInv2l0WVTA09Yp3UWwOG8GFfPEXXT8S4X6SCPgc/WSkMWQ/cmzXAD8jbqLpJ/KsOLJjCZdtKeYBDw/7/O95fOpT3Jm4p+HsfcHaBDsM= X-Microsoft-Antispam-PRVS: <DB4PR05MB3679EC35443A4419C28B70CB0320@DB4PR05MB367.eurprd05.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(34787635062028); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(520078)(3002001); SRVR:DB4PR05MB367; BCL:0; PCL:0; RULEID:; SRVR:DB4PR05MB367; X-Forefront-PRVS: 0726B2D7A6 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; DB4PR05MB367; 23:dFT1nWH1Kxq/2dEi9KBPn8vpxM0r0jYQ+/0vwI?= =?Windows-1252?Q?+IlbP4UcrL5DqWAWGRhG53jiX8YWaY9pGJ3nrKT9UWU8MGChKaw2+hAv?= =?Windows-1252?Q?jNmKY5IuI9bbGQMHstxCws64zV5wDmDqpvm9mFjHBlMoxWrgKKGGiHCA?= =?Windows-1252?Q?7dnsyFDW9XrHlqHK/OPSMBJqn9SLKMnoTEjhhhIq5BxN5GGsYpkODHcs?= =?Windows-1252?Q?g61r4rj3KDx5uiNLWFvdkukDhWovAG0GHHvMcgUFzBypvsWgRlSlRU0Y?= =?Windows-1252?Q?VGUuLv/BGgIn5/vuRi4l/2m0SxN2Hg5wGxZlqFvTRfM080dpHp91dzv7?= =?Windows-1252?Q?QBMZLo7kVjDx/l7aFfXvyQx4eUjmbQREIwax20CPV6CS9yuB1LJXQwvF?= =?Windows-1252?Q?VOalrgrsmiwl/yRrjhEdf/pBmRBEekUh3FyPX7fNAB0V7pkFsEXrcru/?= =?Windows-1252?Q?XpvuWR4YFnRlFhIjHd5UgXlfFL9bKMamHAeE68RGFkxi1FtFrLvGTRaD?= =?Windows-1252?Q?SnV+Ryq1A0/NXhaNmZBmyR89x2SDYuY7sIMpJ7eCJoOyXoQqaZbpBzJh?= =?Windows-1252?Q?hoRxXoZtCZHETz1W6KO6d+CNLHpKA5cluL9pDMYqcHOZQZEfqvMgLrKr?= =?Windows-1252?Q?VR7AzlGKk6phKzfqKU9YWRt5z9ExfoowJ1MEPYuJj1Q+lkVoXxPKr47Y?= =?Windows-1252?Q?JFLb2bUJd4oGnqat+SJh6bFBuptMsSMx91L8Sk5BQM6RK4+JFCcO0aMM?= =?Windows-1252?Q?lBQlB+RP8AmY5nED/jwiMwIxKiFG1G6LEmO8L6ozzocCuJ7G65W2g/jP?= =?Windows-1252?Q?1rfmcUzF64ky+A2YkBEEOkltpGHFsvRz5kx4RPVAx1A91edXztRKbeAG?= =?Windows-1252?Q?5yhijWehTYUZD+XF/o/cKVeFUhdw0GmlPpX3miE4wmhuPauegrkqRC3u?= =?Windows-1252?Q?eziZ2qiUWxDgCa85SFAU7IGBu31oLXePSzoiJRgrd88y1x8tX8zqHH6d?= =?Windows-1252?Q?xgu2+n9lNaiuhlsOz5CUz8sbM1O9t6kOz/ZyzjpsiC9CYP+l1HjngcLC?= =?Windows-1252?Q?Dwqf+bIvzWzjtSzkHfFe0sKGR1Wh7B5GIHyrX64ZBezqxplj0w/bMGpw?= =?Windows-1252?Q?5vdAMfw5bHmHZ1v947pZ793UUQQoh0k614M6ByhWV02SzYmwIwB+sHUB?= =?Windows-1252?Q?MR24LeIqxpsmsxypJJ2BDCkJc5mMjhFuVBBT8041/D0hnkvleKRBotlf?= =?Windows-1252?Q?1SzObxSza9MRGn7TtwEzk0s9E7kQ1zT92CfiZ7MwDTECa8N/VO2qUU8b?= =?Windows-1252?Q?mr?= X-Microsoft-Exchange-Diagnostics: 1; DB4PR05MB367; 5:nRvquECS/ZW5kt04vQUmg3PYMwVMnc2220rkfUgXp4k8iyiy7FvR2LAHoNcUcNlNesjQNLtfeBlVxabYM8PgXNcvmUeyvLBXPInCG+1xO89OZVM42TfccplgjmIwnGp/ULXY9x2Iiq5tSLwmt0CbFA==; 24:W0rtWuuQw+i47aaqe4Xqx+mfUBzjwYJZTo92f4VZ6ItDSaRNZQLB5KW2YPyNRFT0vfufIsximmNn+DqU2Ny6AS5K81cqVXBtXpI/deaIkVM=; 20:eRCBJKhXLwthICPKR3+KiQn7QUjhES93yZk06FtzaVbtEkZhl/Chs+7ZGVTmYZn7Usx7omMMZ42Bag9lg8WILQ== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2015 13:32:28.7642 (UTC) X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=a652971c-7d2e-4d9b-a6a4-d149256f461b; Ip=[193.47.165.134]; Helo=[mtlcas13.mtl.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR05MB367 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: <linux-rdma.vger.kernel.org> X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index e8d2d01..8ad647e 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -1611,9 +1611,15 @@ static void *mlx5_ib_add(struct mlx5_core_dev *mdev) dev->mdev = mdev; + if (ll == IB_LINK_LAYER_ETHERNET) { + err = mlx5_enable_roce(dev); + if (err) + goto err_dealloc; + } + err = get_port_caps(dev); if (err) - goto err_dealloc; + goto err_disable_roce; if (mlx5_use_mad_ifc(dev)) get_ext_port_caps(dev); @@ -1718,16 +1724,10 @@ static void *mlx5_ib_add(struct mlx5_core_dev *mdev) err = init_node_data(dev); if (err) - goto err_dealloc; + goto err_disable_roce; mutex_init(&dev->cap_mask_mutex); - if (ll == IB_LINK_LAYER_ETHERNET) { - err = mlx5_enable_roce(dev); - if (err) - goto err_dealloc; - } - err = create_dev_resources(&dev->devr); if (err) goto err_disable_roce;