From patchwork Tue May 8 18:29:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kalderon, Michal" X-Patchwork-Id: 10387213 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A1E146037F for ; Tue, 8 May 2018 18:30:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 983F92925D for ; Tue, 8 May 2018 18:30:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 945FA29180; Tue, 8 May 2018 18:30:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C23A12918F for ; Tue, 8 May 2018 18:30:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755768AbeEHSaB (ORCPT ); Tue, 8 May 2018 14:30:01 -0400 Received: from mail-by2nam03on0082.outbound.protection.outlook.com ([104.47.42.82]:41952 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755889AbeEHS36 (ORCPT ); Tue, 8 May 2018 14:29:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=w/v4BNWVyL11dCsBwz9HopRtnaQY0f8ZzH+H6OOxuco=; b=Zdn82RU/4BkEpNDP7jFfvzP9eXlKsUWBFl2u6hUr3h7Zlx2TyxuqJutFGFPRz3aPJYUEGbN4xjWEkgslUtIysYQXh3HqukYnbyojdC8W+UHtAuSgmECklUys/wG1RvvfwPYGC5B53Adu7pV9L93ft2To344MqFPD7qGAz2SHkJE= Received: from DM5PR07CA0082.namprd07.prod.outlook.com (2603:10b6:4:ad::47) by SN6PR07MB4397.namprd07.prod.outlook.com (2603:10b6:805:58::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.755.16; Tue, 8 May 2018 18:29:56 +0000 Received: from BL2FFO11OLC004.protection.gbl (2a01:111:f400:7c09::131) by DM5PR07CA0082.outlook.office365.com (2603:10b6:4:ad::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.735.16 via Frontend Transport; Tue, 8 May 2018 18:29:56 +0000 Authentication-Results: spf=pass (sender IP is 50.232.66.26) smtp.mailfrom=cavium.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=cavium.com; Received-SPF: Pass (protection.outlook.com: domain of cavium.com designates 50.232.66.26 as permitted sender) receiver=protection.outlook.com; client-ip=50.232.66.26; helo=CAEXCH02.caveonetworks.com; Received: from CAEXCH02.caveonetworks.com (50.232.66.26) by BL2FFO11OLC004.mail.protection.outlook.com (10.173.161.188) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.715.13 via Frontend Transport; Tue, 8 May 2018 18:29:55 +0000 Received: from lb-tlvb-michal.il.qlogic.com.com (10.185.6.89) by CAEXCH02.caveonetworks.com (10.17.4.29) with Microsoft SMTP Server id 14.2.347.0; Tue, 8 May 2018 11:30:45 -0700 From: Michal Kalderon To: , CC: , , , Michal Kalderon , Sudarsana Kalluru Subject: [PATCH net 1/2] qed: Fix l2 initializations over iWARP personality Date: Tue, 8 May 2018 21:29:18 +0300 Message-ID: <20180508182919.23590-2-Michal.Kalderon@cavium.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180508182919.23590-1-Michal.Kalderon@cavium.com> References: <20180508182919.23590-1-Michal.Kalderon@cavium.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:50.232.66.26; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(39380400002)(39850400004)(396003)(376002)(346002)(2980300002)(438002)(189003)(199004)(356003)(446003)(48376002)(36756003)(16586007)(316002)(47776003)(76176011)(476003)(186003)(51416003)(11346002)(104016004)(478600001)(2616005)(126002)(50466002)(26005)(59450400001)(336012)(486006)(77096007)(72206003)(86362001)(4326008)(305945005)(6666003)(106002)(107886003)(110136005)(5660300001)(54906003)(50226002)(1076002)(106466001)(81166006)(2906002)(81156014)(69596002)(8676002)(8936002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR07MB4397; H:CAEXCH02.caveonetworks.com; FPR:; SPF:Pass; LANG:en; PTR:50-232-66-26-static.hfc.comcastbusiness.net; MX:1; A:1; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC004; 1:t26PEPMP9Y1kvPnJAeAdVGm9PPWQOVYIVOvO1DyxOnH1jp8EDRXd1bllhLKPV12VYD1KeCHyujabNUppjvSx0aAmXiSjDp6rElCEPI92kqWKTraVANxjo/eed7AWiLuW X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4608076)(2017052603328)(7153060); SRVR:SN6PR07MB4397; X-Microsoft-Exchange-Diagnostics: 1; SN6PR07MB4397; 3:TnNi4DTIg5IdmeX9VkWZdIbCQZmfYMxvVa3LRklVptAmpJLpsvenY5hPD4j30DUdDNd1CrxRaqlilP2ukFAhLAhDAO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u5ksHLTCv99rIhhLSK8d9vwNOqeDpuxZSL9wPgOkvsTf/GSu0/YEX82NGRcEaj4NMCYlE137jGGfJfn8Rqi2EMW+gAM4hKEBjfekCgb3COeUMsJk6Dvaspp1b/8hA1EgFoNxgcgttJCjwOt1mpMQ+Eijpx5aXFpskZ8gxQt9j7TLvn6Ig3seZngV+JmXvzPfCqguobo0JRD7TSy5Nbw/315W9zP0R+Q87COUbWoAQN4C1kkKtSixYr+VZ00FJbbbKgwVGRMgOvWuzuaPk6PUi2TdqA29BQxUQeRTPv8mD84rp7ZERPZkNmNUIcbfHAceZKfI6YnW7Wydp1xJV4aN1oYVPFGIMkHKANrDjNO5d8TNnBvt08Vu X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93004095)(3231254)(944501410)(52105095)(3002001)(149027)(150027)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011); SRVR:SN6PR07MB4397; BCL:0; PCL:0; RULEID:; SRVR:SN6PR07MB4397; X-Microsoft-Exchange-Diagnostics: 1; SN6PR07MB4397; 4:llv7lN/ZUZOl0F/bQHXS9AfpoSUeqGZlEPRkARf4IB5l2ZlWPGlFIVfjDTD1nGXFXASzW93oBRaZMjfm0wBqAsxc2Gp8ol6gSPMxtEAV3dwuZKkWP4rVWvzz5K3sEPZGMs6Zo+rGwl2NYxGKtuuZp47/iUBqjPc9HQeW63V6A9qQdnCB9UlnJmQ7GCJ07Qe0xAojNgOWeyUrNc4jLRM/qHJq9MAw9lUF+6coO6IYoXXq9V5rdiDgdfZ7CWDVlqj6G2TMVgNg9qc6z/kX1w8jag== X-Forefront-PRVS: 0666E15D35 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q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Q30F8XUgIyMIuMoe9w4auBZl06rsVPnI8RCHzKyCVmxD+iF6YHWQwkViXRRuTmuR/A90krHHRCJ5fMU/zStam3rOZ885dz9pUTXPzAigvQBBCdopMLrmWEyYSgVTbcyurBtVfIS7UkXq3pwxYuqMT7Fx+KGDSAJgf3Xw=; 24:SD0+vcKrPYP2tls4WdeSAukb6nVsZvuxf6wUJ+jL6XvmDcHv9C7mubXF/RcH9hWkijM3Y9M2Xd1uxu4+YN8bhSRZiABB5BT88YtXjI4e48Y= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN6PR07MB4397; 7:FT7o7DdkD++PswSMWpmGVaEK92uK0BGvpqCwr1LGQ+ooPmQdYH8nyaj07AboqgvQ7Dc8iKVy6DAZszbCdu1mPbF3oujAWKyd/H61EngOEqnkg8cKVITnNfOi++h1iljfxWTBTiE4fJry4v7CAAgx5ke2nesL7SgVGsNSjdvh5BA1T+cHVsuINVRQF7566EXia6P/JM+ewei4mEaXlDJBbFpyxCBzGL+9nyu36FjWYSYbxM9A13PmUgmGxXPDDGsc X-MS-Office365-Filtering-Correlation-Id: 579d8a25-b6e7-407f-7279-08d5b511b2ae X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 May 2018 18:29:55.5897 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 579d8a25-b6e7-407f-7279-08d5b511b2ae X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=711e4ccf-2e9b-4bcf-a551-4094005b6194; Ip=[50.232.66.26]; Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR07MB4397 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If qede driver was loaded on a device configured for iWARP the l2 mutex wouldn't be allocated, and some l2 related resources wouldn't be freed. fixes: c851a9dc4359 ("qed: Introduce iWARP personality") Signed-off-by: Michal Kalderon Signed-off-by: Sudarsana Kalluru --- drivers/net/ethernet/qlogic/qed/qed_l2.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qed/qed_l2.c b/drivers/net/ethernet/qlogic/qed/qed_l2.c index e874504..8667799 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_l2.c +++ b/drivers/net/ethernet/qlogic/qed/qed_l2.c @@ -115,8 +115,7 @@ int qed_l2_alloc(struct qed_hwfn *p_hwfn) void qed_l2_setup(struct qed_hwfn *p_hwfn) { - if (p_hwfn->hw_info.personality != QED_PCI_ETH && - p_hwfn->hw_info.personality != QED_PCI_ETH_ROCE) + if (!QED_IS_L2_PERSONALITY(p_hwfn)) return; mutex_init(&p_hwfn->p_l2_info->lock); @@ -126,8 +125,7 @@ void qed_l2_free(struct qed_hwfn *p_hwfn) { u32 i; - if (p_hwfn->hw_info.personality != QED_PCI_ETH && - p_hwfn->hw_info.personality != QED_PCI_ETH_ROCE) + if (!QED_IS_L2_PERSONALITY(p_hwfn)) return; if (!p_hwfn->p_l2_info)