From patchwork Wed May 31 13:33:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dupuis, Chad" X-Patchwork-Id: 9757047 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 37CF060390 for ; Wed, 31 May 2017 13:34:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 32CC320952 for ; Wed, 31 May 2017 13:34:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 27BAD27EE2; Wed, 31 May 2017 13:34:28 +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 8173720952 for ; Wed, 31 May 2017 13:34:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751193AbdEaNeZ (ORCPT ); Wed, 31 May 2017 09:34:25 -0400 Received: from mail-by2nam03on0054.outbound.protection.outlook.com ([104.47.42.54]:48144 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751022AbdEaNeV (ORCPT ); Wed, 31 May 2017 09:34:21 -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=fgQm/n/kb6FmYeBGmd0dsJEAsKadHeZIZXVtgujaI9I=; b=k928TslvwmKu96FhGCt+kUQdoETn6yAIJ2VHDFzic+GoNJzlimhnvKDre9s4KfwiHizhVSCRdDekpmOFuwVa1yFEXl84taoCInhfRoQyneny8wZvZnng0VIZpUy5C2fukWxzAGkosdnQ7GVuYXCQ0QCZrPPFgIte9XJSxWUY2j0= Received: from DM5PR07CA0033.namprd07.prod.outlook.com (10.168.109.19) by SN2PR0701MB1024.namprd07.prod.outlook.com (10.160.57.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9; Wed, 31 May 2017 13:34:10 +0000 Received: from BL2FFO11OLC005.protection.gbl (2a01:111:f400:7c09::147) by DM5PR07CA0033.outlook.office365.com (2603:10b6:3:16::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9 via Frontend Transport; Wed, 31 May 2017 13:34:10 +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 BL2FFO11OLC005.mail.protection.outlook.com (10.173.160.91) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.1101.12 via Frontend Transport; Wed, 31 May 2017 13:34:09 +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; Wed, 31 May 2017 06:34:03 -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 v4VDY2cx016668; Wed, 31 May 2017 06:34:02 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id v4VDY297016667; Wed, 31 May 2017 06:34:02 -0700 From: "Dupuis, Chad" To: CC: , , Subject: [PATCH V2 01/15] qedf: Enable basic FDMI information. Date: Wed, 31 May 2017 06:33:48 -0700 Message-ID: <20170531133402.16629-2-chad.dupuis@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170531133402.16629-1-chad.dupuis@cavium.com> References: <20170531133402.16629-1-chad.dupuis@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)(6009001)(39840400002)(39450400003)(39400400002)(39850400002)(39410400002)(2980300002)(428002)(199003)(40224003)(189002)(9170700003)(6666003)(4326008)(478600001)(54906002)(86362001)(575784001)(189998001)(47776003)(305945005)(80596001)(5660300001)(5003940100001)(6916009)(48376002)(2950100002)(72206003)(42186005)(2906002)(50986999)(76176999)(33646002)(1076002)(8676002)(50466002)(101416001)(105586002)(2351001)(356003)(36756003)(8936002)(106466001)(107886003)(110136004)(81166006)(38730400002)(87636003)(50226002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR0701MB1024; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC005; 1:PP1Vhb5qUltZpMIg2jy92WGOzakJBF/iopZXdGaOLInSvew0Vc5kqtfpJTe+YXex49cjB16+w1YLqDZNOEp9+GKen1hUCcAxC8IG12MY10PPwEVLeMcnV8BuWtcmpM1w73V+s0dCX4nlBrT7OtCbHjYUjZwtMBOWAUaw9wcyQ3ymDBY7UgZn8W6ceIw/EuhlfnvwC3xbU1UwyjgfGUybxTjDfkFYzyI839kHPWQiUu19z3kXNb6B9BNH1FNbFnIzfephb97pDUTb0XRQmUAfJXvTAg0+V+gMKheICrPb3PWSfr5ILiprl/7Sbcor0wGo4RX9RGe7e9pZvA6vrBG/3ryifaqQvqLm9BX1B4BrywHhdDqUmFV1jENXUdBpcEbOQ545Rp9FLi4PxCQgUdNfV8AicyN1GvJOxZ1JrxJYKVHuw/98EnIuYADHnyFO7E3QkH0Xdspx+PlVsxa0MsZLBQ== X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN2PR0701MB1024: X-MS-Office365-Filtering-Correlation-Id: 83f7d5cb-3a5a-459b-80d5-08d4a829b7b4 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:SN2PR0701MB1024; X-Microsoft-Exchange-Diagnostics: 1; SN2PR0701MB1024; 3:ITYPQ0w+jwnjIyLcl9mjU3EVsS7urZH2Xi/4fG6p60OCZN6qtEOJgA0LRgWJ6KjHgxzpXijdvcb1sCazTU8Zg+4V9BDmeuJVpRdWu4u4Pi8K+T3Jfot/Y2bOgOaybiq/hV7iG5ts2woJyHXIH1Mi1qHRJfmzlw+pVBA5Ih5Kcf5K2bPysSuhzrXKs4xV7GsJp3ID8awe5KzPwDJJnbDmh5pUViZne8oMgMOiauWF1o1NubKQijAhKOfxnZ7uScj+LcxT+4ZbCD1mZQYDp+Z4sbTvWxXdq3F3k6JiUU0tGZpBAehNL8BtuuAqmZZGAtOb9PNMDcvo9q2zwBjjfZz6ryAf1RCv+fCsjSdpGt+qUdZM987dlCs81y69NEM0WTJ9ZpXk75q0Dk/j+L3dsxOLc37yLzSFEY1HbrkarqVhp2B9I788ggQzvzmXrm7JF6gKVM6SE7l7lvFWc+jlwyYy9GZ8CCsUh9yLRhkZ8/gatURQO3c9Pxh4pW9Kb7MMlsfW X-Microsoft-Exchange-Diagnostics: 1; SN2PR0701MB1024; 25:72fRYKGIuorHXHpvKscfAo2/DdO+6Ysh8LcXKhHRRtkPpqXT3Fvlyarh2QcJyL4Tk/+OXUXyrh9SQKKXYt5SVAMCH8ZI2WClDLJGZx5Q3WqYzRXqlkWoA422gMV22XU3lMRn0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ObQBKJ7qAc2s47GXZwRBfkVmGqVNoxUqZ/wqPLAnLhhMki/9zd7tcymjBA4p1BubiNLhO9z0YkXxyFke+yKqg0/mdyzRZ9ibKSL45wnMobEny5mJ/PplpMGB/xdgvwDja7sED X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13016025)(5005006)(8121501046)(13018025)(10201501046)(93006095)(93001095)(3002001)(6041248)(20161123555025)(20161123562025)(20161123564025)(20161123558100)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148); SRVR:SN2PR0701MB1024; BCL:0; PCL:0; RULEID:; SRVR:SN2PR0701MB1024; X-Microsoft-Exchange-Diagnostics: 1; SN2PR0701MB1024; 4:31t+rUK553aFMfPAbOoXKRm0oDf8FROWaK8jUqUvAnh8Gvi6enYLUkYIB6HJE2P4d6xodBFb+OJ4i+KwBDJ0dVYA4OEsbHT8ZKjO+s8K0OBrIZdzALeWDK5tPuwv15gXOJulAlic7tG/oc4ontutItFfUFjGEBTg1c8tOZww/UTmhbreR0vCedKu7ejWJwG563d3bE3TKH/ustvTnjYhhw7LM5rQifqIaJ3vrmcvBktQ/5ZmlFhPjNro7fhkTsJm8UvL5/Xi51x0Hi/X/Fz7P8zq4wgy518X54d/MZLWhQvW4PTsiKUwRhNH8ozsc/5QWWwNQ3YMGL85DdN4Tz0D+oWhFXQ1ooGRuU6pW/Isxnl5if1XKMva7OCfbOyNMwIxFXLw9eQckaSdxdtdCku3J6M30QW786x1ii64ahvxVjwzjtgnpz4FJivePGpf2jyAAlJSmwB1nqiFNDU8G295NGxwtCl4bY5GU0w6hYjsl3Fk/oldBKtH8MTdQrDqwMamGZn5wuUMeoFx2ZaHXUckYSMGCDgaO5t2F1ERDb+GcssmLY/ZjiVGMkisIxj2Jzhke05qcghx+iNhgx4RwxVIqbRokqMLURhMycYdaXDSRfAse4AEUjiqVjmYJYyQSBEiCVHAf/SR4C+XEa+Tie/e8pohBa+kQvxp/KRVorABbac/qMur1EmRSNlJnfCNaCXOM5zbYr3eshNmcE7QuVH6zgdL6Jlane7biuOknkZZLwbP77KLO6BNqA1gMXS///LngCDxmuOoolt3JNj9zhqNMePK5TJuRP6UPXNufCNhfq4Xt8fDX8WWYrNkxr64IFkm X-Forefront-PRVS: 0324C2C0E2 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR0701MB1024; 23:iUFnjJJE/P9+4QIVG+XeoH58jID2h94WtMDFdEp?= =?us-ascii?Q?tOJESRQX7b8JskEaJfD5DIbeYKi2RtJTK+LEn5ta71KbXCyBE8SrJMoyvdQn?= =?us-ascii?Q?PJDgSYoCnpcObVXbqyMiwvMXXxIF3vakHnfMOa568nVsOKEwufLkMss0wPS5?= =?us-ascii?Q?QDKvCJLHKhB9+IVAoB2k1ciMvI2jOgToWc5iAH3v2eWiIKk+eyQhZ060p/YJ?= =?us-ascii?Q?AVcMBeRsk/cK23PbvUBQqifAzcSEbLer7t3Plgfi5yvJl0jAotQJEnHfUaOF?= =?us-ascii?Q?nxBsikDlbNBMkbV16A18cWV9Dwzc1CuGtmTi0rxEq2/X7wt3N2YLDKxUK9Ps?= =?us-ascii?Q?cddPnhjHGATLr6bYqClsHtsKEwZ749XZZtNmAnSgv2GXiqTrXFBfgOgqUWhA?= =?us-ascii?Q?/ZSLbiuDFl7up2hBplZX4eK4p0oaDc9e+kusfPVLqQg/J+yWzMHRc8Hf8WHT?= =?us-ascii?Q?ZhA0KPStNGosNYz0XfBfImwL1Ncy8vYavfkkZvFeyG1cJHyknk5ckAQkt3wu?= =?us-ascii?Q?H3qTFBuc2n7KRIOl1RW+qMiub9y+aI9bS6TQ5E/JrDvD93a/o9LfUpDr3GCC?= =?us-ascii?Q?TYIDh2diBK1KdBGj9c1LoI6OWg8G77W3qB+Svaw1Z2VMrAw/T8vS8yOvPXAd?= =?us-ascii?Q?Quk74C837HYsCA4hezm0k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8VzoL0lXFxKLRZU96KV+oQ4SNyEoODOvb63Ydm3emCmxGu4Hxkn9ErkQiAHNEo35cQaRPLiHDZwxx4Cw4HOxTz1xXGFNRuDdTxrIN1BwYQQCUGtWLsCMSmzZKivXn4MGmLDGNZyFxlRY9rI6nIsFz1GfU8s2cP+HjT9J4Dc+7IykZ4t9UuY8tzLfXCA==; 5:9Wpf3rvRH1ii0ZDS1HHuxxkTkYxnqqsBls8xy6eWdNm3JKyd7UbGEvIlUUfT/UQtPFbxcxavcsxMYL7hkyOU10qYChK5WbNFVNkiWrN0V2r6L/8JRiZfIgrNZ2Odmy3HHLOwN8sHUs/GXHl6eQrEgg==; 24:a4kmqBQb1BZYGyvTuuul5EOSH1fz35z+IsjSwCfoRutw0LpEDA/86vhzB9zJBddc4P/V6MOVKKQWBsbxta/sfebFytnR0l7Cxj4QWt4ovLs= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN2PR0701MB1024; 7:AOyjp33tPvIS7Wzh30H4jbW/WSCJvGB93JoRFhrszADyGkONJjREeYcOwzrJAlMKgvgt9meNphKxzD8cQ+U7YKJLFp7497j644lbmUpaAoozszECDtIs21JBw1kNF2zYF3VWOydx3uvk0If6JPAh1SoaWILvOzDujGp26n58tu0SXC3z6Z8/MixG3Iat4ArHIEiPknqzy7VX48wvNdsbuAXa50HL6WwGsH84ZyghdHeg3zJe/UQD1J+d1F7eEsUHYDoAkfsFoIVA8E5iaMDrf20As8TScBlIUg6iwer0VuttmFwrWesW1WXE17W3sFKI9Ts8otQZ2H2exSeVNtEriA== X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2017 13:34:09.1836 (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: SN2PR0701MB1024 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP For libfc to register FDMI attributes we need to do two things: - Set the appropriate fc_host attributes that libfc will use to form the FDMI registration commands - Set lport->fdmi_enabled to 1 Signed-off-by: Chad Dupuis --- drivers/scsi/qedf/qedf_main.c | 56 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c index cceddd9..8d0a999 100644 --- a/drivers/scsi/qedf/qedf_main.c +++ b/drivers/scsi/qedf/qedf_main.c @@ -22,6 +22,7 @@ #include #include #include "qedf.h" +#include const struct qed_fcoe_ops *qed_ops; @@ -1334,6 +1335,59 @@ static void qedf_fcoe_ctlr_setup(struct qedf_ctx *qedf) ether_addr_copy(qedf->ctlr.ctl_src_addr, qedf->mac); } +static void qedf_setup_fdmi(struct qedf_ctx *qedf) +{ + struct fc_lport *lport = qedf->lport; + struct fc_host_attrs *fc_host = shost_to_fc_host(lport->host); + u8 buf[8]; + int i, pos; + + /* + * fdmi_enabled needs to be set for libfc to execute FDMI registration. + */ + lport->fdmi_enabled = 1; + + /* + * Setup the necessary fc_host attributes to that will be used to fill + * in the FDMI information. + */ + + /* Get the PCI-e Device Serial Number Capability */ + pos = pci_find_ext_capability(qedf->pdev, PCI_EXT_CAP_ID_DSN); + if (pos) { + pos += 4; + for (i = 0; i < 8; i++) + pci_read_config_byte(qedf->pdev, pos + i, &buf[i]); + + snprintf(fc_host->serial_number, + sizeof(fc_host->serial_number), + "%02X%02X%02X%02X%02X%02X%02X%02X", + buf[7], buf[6], buf[5], buf[4], + buf[3], buf[2], buf[1], buf[0]); + } else + snprintf(fc_host->serial_number, + sizeof(fc_host->serial_number), "Unknown"); + + snprintf(fc_host->manufacturer, + sizeof(fc_host->manufacturer), "%s", "Cavium Inc."); + + snprintf(fc_host->model, sizeof(fc_host->model), "%s", "QL41000"); + + snprintf(fc_host->model_description, sizeof(fc_host->model_description), + "%s", "QLogic FastLinQ QL41000 Series 10/25/40/50GGbE Controller" + "(FCoE)"); + + snprintf(fc_host->hardware_version, sizeof(fc_host->hardware_version), + "Rev %d", qedf->pdev->revision); + + snprintf(fc_host->driver_version, sizeof(fc_host->driver_version), + "%s", QEDF_VERSION); + + snprintf(fc_host->firmware_version, sizeof(fc_host->firmware_version), + "%d.%d.%d.%d", FW_MAJOR_VERSION, FW_MINOR_VERSION, + FW_REVISION_VERSION, FW_ENGINEERING_VERSION); +} + static int qedf_lport_setup(struct qedf_ctx *qedf) { struct fc_lport *lport = qedf->lport; @@ -1377,6 +1431,8 @@ static int qedf_lport_setup(struct qedf_ctx *qedf) snprintf(fc_host_symbolic_name(lport->host), 256, "QLogic %s v%s", QEDF_MODULE_NAME, QEDF_VERSION); + qedf_setup_fdmi(qedf); + return 0; }