Message ID | 20170815170821.20806-2-chad.dupuis@cavium.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show
Return-Path: <linux-scsi-owner@kernel.org> 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 49D9E60230 for <patchwork-linux-scsi@patchwork.kernel.org>; Tue, 15 Aug 2017 17:08:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2B0662888C for <patchwork-linux-scsi@patchwork.kernel.org>; Tue, 15 Aug 2017 17:08:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1BFE3288AD; Tue, 15 Aug 2017 17:08:31 +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=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI 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 71B232888C for <patchwork-linux-scsi@patchwork.kernel.org>; Tue, 15 Aug 2017 17:08:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752159AbdHORI3 (ORCPT <rfc822;patchwork-linux-scsi@patchwork.kernel.org>); Tue, 15 Aug 2017 13:08:29 -0400 Received: from mail-bn3nam01on0067.outbound.protection.outlook.com ([104.47.33.67]:18063 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751605AbdHORI2 (ORCPT <rfc822;linux-scsi@vger.kernel.org>); Tue, 15 Aug 2017 13:08:28 -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=avy+/kTGiLCAw9j6PwT2u6sHq4ZkqVNVUk35CDZOdys=; b=XK1Nw0JvzFIUfJuW+NNQgu9hOolfJuCQYRZHpfv0IlcxR66yD94mpu/OJL9iK1BWNsQpv1gLbbINucOIGCqqzNFwaQI/nFXBIgbXp6qqfabOC0OYKXrWtEV3IjliIcVAw4bj+ohGiM04VN1XtjKRb77CnBzL1y5PM7OYEnWiqOE= Received: from BY2PR07CA0086.namprd07.prod.outlook.com (10.166.107.39) by MWHPR07MB3455.namprd07.prod.outlook.com (10.164.192.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1341.17; Tue, 15 Aug 2017 17:08:25 +0000 Received: from BN1AFFO11FD017.protection.gbl (2a01:111:f400:7c10::196) by BY2PR07CA0086.outlook.office365.com (2a01:111:e400:7bff::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1304.22 via Frontend Transport; Tue, 15 Aug 2017 17:08:25 +0000 Authentication-Results: spf=none (sender IP is 50.232.66.26) smtp.mailfrom=cavium.com; oracle.com; dkim=none (message not signed) header.d=none; oracle.com; dmarc=none action=none header.from=cavium.com; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) Received: from CAEXCH02.caveonetworks.com (50.232.66.26) by BN1AFFO11FD017.mail.protection.outlook.com (10.58.52.77) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.1304.16 via Frontend Transport; Tue, 15 Aug 2017 17:08:23 +0000 Received: from dut1171.mv.qlogic.com (172.29.51.171) by CAEXCH02.caveonetworks.com (10.17.4.29) with Microsoft SMTP Server id 14.2.347.0; Tue, 15 Aug 2017 10:08:22 -0700 Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id v7FH8MZU020845; Tue, 15 Aug 2017 10:08:22 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id v7FH8MGg020844; Tue, 15 Aug 2017 10:08:22 -0700 From: Chad Dupuis <chad.dupuis@cavium.com> To: <martin.petersen@oracle.com> CC: <linux-scsi@vger.kernel.org>, <james.bottomley@hansenpartnership.com>, <QLogic-Storage-Upstream@cavium.com> Subject: [PATCH 1/6] qedf: Set WWNN and WWPN based on values from qed. Date: Tue, 15 Aug 2017 10:08:16 -0700 Message-ID: <20170815170821.20806-2-chad.dupuis@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170815170821.20806-1-chad.dupuis@cavium.com> References: <20170815170821.20806-1-chad.dupuis@cavium.com> MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:50.232.66.26; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(428002)(189002)(199003)(42186005)(6916009)(105586002)(2351001)(2950100002)(6666003)(72206003)(5003940100001)(478600001)(54906002)(87636003)(107886003)(106466001)(110136004)(50986999)(2906002)(76176999)(47776003)(33646002)(101416001)(4326008)(80596001)(1076002)(305945005)(189998001)(356003)(69596002)(81156014)(81166006)(50466002)(5660300001)(50226002)(626005)(8936002)(86362001)(36756003)(8676002)(48376002); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR07MB3455; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; PTR:50-232-66-26-static.hfc.comcastbusiness.net; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD017; 1:wQFLzml48NX2oACXWji/+8jS/mAaOgvgpUqcbNTRtcQvNEHvlmEO5niOrgK0YWeZLCqKKMsjL9l9Z6gw9v6VvTPIpT3JZtty0l9/wgDRAt2M5dDC1548Sl22dcDE0YZCXBhxCBdRCsLLbqh8YBR9wl9J0Fg7ooktWeRI+zp7PfV4azi/UTwxF68AyBfWmT81q+/s48lI3+aX7+Sc//P70NUlaRtFYCLy42JGYNOn8k5nnGbdcZMN+ZUrcZWjxeDt+QzYahl/bPBkoshA0TvUaloZ8mXYJfl0pnQE708P5e1Gd6RA+4c5KUxKVhgW0XRPQs+NeZbrsPR6JCi6JlMZ3MCGb+CfIBoHc9d9dNnStfXNfhzC8imXaeeV6U1ljYVtNPoJK1IS3ZqcOH0WVp7IDYolIDmJDzum7nGdkMYgveyqR2WTjkSA4Q4rbZcNqmDtjSfOBgDFeGVFXYB22oIABokbmiFeSoUWvYPU6kA8EwXeeH2EV2NdwrzZ6rgxSTiwenpmcMbaAKs1UBOWQXJtpABYWT59jEqaxEmD41Bsrgdyk+qcMbnltbkL+wFr7wUCqh2XSfll03nml8jQNM9d4Wr2NeVQloQdnIChPVGCsZR47DoWtv6aTkuHdBciCT0TP8WGzeE9xJAVFcrVjHoP5B13SdJK7ONgKzRQYji9NHEGlwAtZL0ni+QHnbaXAKl/coZuvOBTBDsKcZ6uXRrYU+nPyykx0iMWWFW+FYTcNXcM5SereL1TyxuyT1UUXTT2JzBMN+A+NogcN5E62gAqmfALYKmjZvxh+MOsschnfjo= X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f7af6ec5-dc45-46aa-a55f-08d4e4003d65 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:MWHPR07MB3455; X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3455; 3:ME5cvMYl58vbJPJY3Vbc0+zxmcKlbAUA8uLacDdDaYiVC+hTmd4FjaephP6V1noowv5E5c4VrkeShsDZ/cDfx9mskPV+z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jyq9pAS9yqiwZkmb52OGIzFL4WQFW+OsXJRukoFFiW6Ob7nZtBanB5FdG9qMmnkXE1w/6vJTeMrNvbayj7Lp/GwebCDDXjKRD9gr1GUekKRxdSJIJulSaig3mCtBWPx2jglayRjXGqYkX6mStWUfZ6Ayq4+jb2T5Mzzmh2Xo6OBeiKBdVbU0ZODqyJ+XSxiLUSSk7aXUfYJcH6fD1SzezE+IZfUDhyNsRPFCk7+Pd/MhAjZrEWIFM4KjrrfZanKGatiapEG4YoCl33Pub+sh8v5JMJoY5YnEEUfI0hUA5GBk7/WnCl0pr2pu1sFwdANtk0bVTDSTdC1NliaEOeMHdr/K; 4:Z4bVhbKwG1fMjmTtTgd23RTXs9jqWcdpb8f0AK2CYHryKlwHxaK2o8nc8Yp8DrWNqEbyBOLiTmaGi/XusvGDFWGDzmbBw349CFcIFTFMCseDCCH8Cd1BXIP6LG2vEIYIqR9761yaA2NuEnNxJa276SFnfdjrAEBTXjO4ivLfT4XHJuckDoePpiT4sLDccGXOaWomXxE7N6vZ11QdxSFe5fs3RAAabhyKN0u56Ob/LCXuaDB58IuzD5ep+13vShCR X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: <MWHPR07MB34557E8B1DCD1F7C15CE05E89E8D0@MWHPR07MB3455.namprd07.prod.outlook.com> X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(13016025)(8121501046)(13018025)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123555025)(20161123558100)(20161123564025)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR07MB3455; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR07MB3455; X-Forefront-PRVS: 04004D94E2 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR07MB3455; 23:UL1S9Fpw5FQh8IURcjCihTjrBD4HUV3nae3TsRtGS?= =?us-ascii?Q?5rTBrplV12ceDnrIPXOjZTLNkAD4FF38kNDBD9Rk/5pa31s96sTda4eoYLsZ?= =?us-ascii?Q?ijnyHBsKu+jLIaU2RwFJzr9OMu7KfJE6dVKhYynmKaxASe1hnA4dAFTuNQSm?= =?us-ascii?Q?bdDfEI9E3qp9vqmlfQpSK78WbjgeOePRzEER2Mr9ZUQfyJXkBjET2N2ntZOv?= =?us-ascii?Q?lmI0je7iI4YR9zMaIZYEDd6RYI7r0UEtXuoGc1qB9mYAMBAFHF84mMUtkmGS?= =?us-ascii?Q?/8tKokc3IQpYTX3mDkMoHVGaM1GuuG9XwQcIFzY6fE5VR4HBP6iJStWkzYtc?= =?us-ascii?Q?W+y1X9Qlj50GlF+xpgLcAYLx6BB3InhvoaEZMvy5hUizuhKTjQ/rS+jtID23?= =?us-ascii?Q?6pEDjLhi0Ck2n1UhwWh7JRMHcvFkC0hDYmN+x0Njo1fmAoGWHbB3xfyaB/1b?= =?us-ascii?Q?MnucTt1mCHAJRyECpER7hr0LCCtMY8RwysPlmjVRPNiVk7iAZyvXS1Zsh3Sx?= =?us-ascii?Q?RF8OPVAPhftMNRQckAx0+V2M7ExzNMqO0KSqW/rgzCrDpUpQr43nfjGaDhpi?= =?us-ascii?Q?he0ofjso+AJoKfm+DA/ebIwypdhDcsMNIJ//oxvWopFS/PQTP1iiykksXItE?= =?us-ascii?Q?GGL4gNVpiVZStx7Ec8iF3NnWGBhmyMaaC0rc5blQhV7vk+Vvphb/0DvR6YWS?= =?us-ascii?Q?YcwV8LMmWcT6+M6jKDxV1y6cYDRxGsWdk33/+oBU5NbXGf4ivEFJC92PuKIb?= =?us-ascii?Q?PfIKSUT40VAWM1B1JyL5eg1x0mifii40rz4fcEAR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j/HK53rFY+0d9ps0g1rfSVawnzorOKk8raPtq+qm/r2kTYpl7+4RSks4QrsgzvParMgsLxe77XEDPPUxFMKKipLj6i1j9DPiewC6btyMNyuCNTLNoQCJU6ENtWudLz4hg1Ln3fSkBnagV3EE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2017 17:08:23.5899 (UTC) 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: MWHPR07MB3455 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: <linux-scsi.vger.kernel.org> X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c index 1d13c9ca517d..9744b6aa2a03 100644 --- a/drivers/scsi/qedf/qedf_main.c +++ b/drivers/scsi/qedf/qedf_main.c @@ -3056,9 +3056,24 @@ static int __qedf_probe(struct pci_dev *pdev, int mode) QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_DISC, "MAC address is %pM.\n", qedf->mac); - /* Set the WWNN and WWPN based on the MAC address */ - qedf->wwnn = fcoe_wwn_from_mac(qedf->mac, 1, 0); - qedf->wwpn = fcoe_wwn_from_mac(qedf->mac, 2, 0); + /* + * Set the WWNN and WWPN in the following way: + * + * If the info we get from qed is non-zero then use that to set the + * WWPN and WWNN. Otherwise fall back to use fcoe_wwn_from_mac() based + * on the MAC address. + */ + if (qedf->dev_info.wwnn != 0 && qedf->dev_info.wwpn != 0) { + QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_DISC, + "Setting WWPN and WWNN from qed dev_info.\n"); + qedf->wwnn = qedf->dev_info.wwnn; + qedf->wwpn = qedf->dev_info.wwpn; + } else { + QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_DISC, + "Setting WWPN and WWNN using fcoe_wwn_from_mac().\n"); + qedf->wwnn = fcoe_wwn_from_mac(qedf->mac, 1, 0); + qedf->wwpn = fcoe_wwn_from_mac(qedf->mac, 2, 0); + } QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_DISC, "WWNN=%016llx " "WWPN=%016llx.\n", qedf->wwnn, qedf->wwpn);
If dev_info.wwpn and dev_info.wwnn are set by qed use these values to set the WWNs of the port. Otherwise fall back to the old method using fcoe_wwn_from_mac(). Signed-off-by: Chad Dupuis <chad.dupuis@cavium.com> --- drivers/scsi/qedf/qedf_main.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-)