From patchwork Tue May 23 13:19:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dupuis, Chad" X-Patchwork-Id: 9742551 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 A29DC6032C for ; Tue, 23 May 2017 13:19:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 90D4E287D7 for ; Tue, 23 May 2017 13:19:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 85703287DA; Tue, 23 May 2017 13:19:50 +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 A1681287D7 for ; Tue, 23 May 2017 13:19:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937108AbdEWNTq (ORCPT ); Tue, 23 May 2017 09:19:46 -0400 Received: from mail-dm3nam03on0076.outbound.protection.outlook.com ([104.47.41.76]:45395 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S965465AbdEWNTi (ORCPT ); Tue, 23 May 2017 09:19:38 -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=WVkhFUA6+u30IgtGlD006+v9Y9Uuh3QXKBtEgYjq270=; b=VIIKHKPJjDs2GbWMn9YqCEofRoED+s1f9sf2slyQPejr8z2t21o9yfyn0QVOZY/bhZooID5v8OF1pP0ZAcZ4M9W6QyCefnCv2fZ8xhbbcNijf95974xiy3z/pu6/GROwxYWaGPWAWklP/Yd12e0pbXFoR6PYSVI5aFAhEIqKq3g= Received: from BN6PR07CA0024.namprd07.prod.outlook.com (10.173.33.162) by BN1PR07MB421.namprd07.prod.outlook.com (10.141.59.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14; Tue, 23 May 2017 13:19:36 +0000 Received: from BN1AFFO11FD012.protection.gbl (2a01:111:f400:7c10::141) by BN6PR07CA0024.outlook.office365.com (2603:10b6:404:3a::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14 via Frontend Transport; Tue, 23 May 2017 13:19:35 +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 BN1AFFO11FD012.mail.protection.outlook.com (10.58.52.72) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.1075.5 via Frontend Transport; Tue, 23 May 2017 13:19:35 +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, 23 May 2017 06:19:31 -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 v4NDJWkb001816; Tue, 23 May 2017 06:19:32 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id v4NDJWZg001815; Tue, 23 May 2017 06:19:32 -0700 From: "Dupuis, Chad" To: CC: , , Subject: [PATCH 01/15] qedf: Enable basic FDMI information. Date: Tue, 23 May 2017 06:19:17 -0700 Message-ID: <20170523131931.1777-2-chad.dupuis@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170523131931.1777-1-chad.dupuis@cavium.com> References: <20170523131931.1777-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)(39850400002)(39410400002)(39400400002)(39450400003)(2980300002)(428002)(189002)(40224003)(199003)(9170700003)(38730400002)(110136004)(33646002)(107886003)(8936002)(478600001)(356003)(50226002)(54906002)(4326008)(5660300001)(189998001)(48376002)(86362001)(81166006)(72206003)(8676002)(50466002)(106466001)(101416001)(76176999)(1076002)(5003940100001)(305945005)(2906002)(42186005)(105586002)(80596001)(50986999)(36756003)(2950100002)(6666003)(47776003)(2351001)(6916009); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR07MB421; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD012; 1:x6Ww9NhK9sauoGs8UsjQLRY9RUIdAEuYvH/RnCkad4CVM5JcMK35kFjQt7qi7LtRlD6Mxwh8SPxVgSaAC6EDoB6zlkhDzqX+j/0OcQWEuYGBvGwbDoAAHXOTmz4a3bke2swAXqHyFkEDD+05yq/Ad6u0nC9FP8GOwzBBgWm0cJJaZx0JIpHXFcFvt80qcZGQz36dwqPLRAxM1lxx1lIpKQBOO0ZHaOLx6bzJEkejlKIiqG49KN42yJmN71vviiTSsM3i5XQKxu8Xq9yvHU60ONwUCJum4+6sMmoGs+fIiSo18jk05Ebsn5GqsPk3Y6YonINqOyBg1mRmKi6o7LPJeEnI2ky7Zg6rTmgsHKZ0CtgOyQvQQOp/j+Zgp3qrR7NATj/GqfwnYKXFfvYSlq9Rfj11A8p9jyFTrqEB63q7Bb3Q81iKQ4DMN9Jz+WAy+9SnpDN/Ad4lJVEBrRFSzMrbXht+U5gRWvio/RyKYy0EcaERXidPrBC+RI2U80gJPn5sG2CZjGG4KVAuA7A18Xmj7A== X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PR07MB421: X-MS-Office365-Filtering-Correlation-Id: 48c81859-1291-457e-9150-08d4a1de5bc6 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:BN1PR07MB421; X-Microsoft-Exchange-Diagnostics: 1; BN1PR07MB421; 3:7h96/neipOSc2Ld3lPZ1iaeFEP0kN/dB16lA3oHCCB2xku3iKpoAr29ju4e2HMk7WkIlingUKghuiN7mnsAfadUL20wDTijrREqqHOIuqn2TjFMvgX0szYYzkNkO5B3Q1H7zTBM6r3OuDVWTKSU4/l7LrQB9LAIg8s5xqre/VTCmprDvEg0Rj2ZSTQZPN+SJ23zIbgWbBuRe3Wn09jYqV9MxLHlQFw7KanVE5XuJUQ0wHn6yX2g+akgSQmtzR30hcyUUOdZrAVU41dyVYOzx/T2Px8Dld/HzIbqJ9x9+aX0CONz7qStbm82GGvxaq2ytRCzr/89AnZy9JxQUg6S/YhmrDsu/njcZ0Zh8f3IZtw2VaO02CpX3uEB4WuBip03GZWfW6KdvCwNNS+Pyjz/uwM4/FMZXCbuHUwLZGJXKLcegZGG/WMBlYM/Ep7N4gxTSCbd2jPGk2beJRj7prE2dFraZcox5ZmbBDgd0Yx2RrBnU646dn5i/JFQP+ZhRYMfp X-Microsoft-Exchange-Diagnostics: 1; BN1PR07MB421; 25:qVqICdp33yrIqmVZHIuj7AVtMgc4PTTewTrmNiJ61kszPQu6b8kO6XkmrXxWyZDQwl06EHTCG3lwRU24dYmmmkwba7UhpgW+Zq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6zf9UBEaC3mbe5VEGIPvv2a2i3JUF9Tc6JbjRMIZTpdGj8eGu2iEt5UYgeR+KlzKdiKCenqq1SD7q+uRUO5jMxJTg7MBiYn9BMd117uxer1CAo0C4Omz8A3tUYWitgQszZBOD+AmwS6zM6FohgFT X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(13024025)(5005006)(13017025)(13015025)(13018025)(13023025)(3002001)(10201501046)(93006095)(93001095)(6041248)(20161123560025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123562025)(20161123558100)(6072148); SRVR:BN1PR07MB421; BCL:0; PCL:0; RULEID:; SRVR:BN1PR07MB421; X-Microsoft-Exchange-Diagnostics: 1; BN1PR07MB421; 4:y1VjHfc0xZ+VsgF5zTGlp5Saz1Rlv7ILC3ZsL0clPfEKOCCmyXGPNRDASuVmfcqHwT9J81+M427kkHh/woIrLIxs5O6l89qS7hAJP9C+QLCVF5i07ZMlKz7vBhH988KFm0UDr3hZ8DXr4clHVXC8VpiRCMKE/Q0YD+V75e6A1Rik67Sj7Z9j52m/lx+IIjdtltJLSwYIa8X0+AV4b5Y5ycA7PT5agBi37Xf+dcRlxI/VoqKRLWUdnx5RRvKAvz/ybKyBIT6NukzV7tJRS3kutVZ0V9oqs/jgyiUiB0bDPFvRvS3m8kUi6KIpEuOnRQh+gaVsuUlOAXepl7CV8kC6mbbvyNT8/3MoBcbJl1TxNSp9cChQOQ2yFecK/DQhsZ73uiEzVPwkQGhZcCOeinOmO7ci0mZ+kmL2B0aiP9lyTCvAosT/QoQFZjodgQEREe6vN3qfgIqRKgNS7epPXv2XW0RbuXoMqryzv4+P+eGhegnvnOFFYWmMP58GTxpJONvkUwR61SvygNhMDcuM4zHW89/LlMxIOGGPDLJTBwF1Ta+Q7JvuH8GPBzURt21Rfk7x7wtVM3z5CDyWZ1vmcFtToxy4klILoLgmLEGEnThASZiSkRQOAJOFLr1purHyDZCWTO3rpin8AJ8xdkpyvWQN+iMCwNCGUHqGnreQA5jNwN7RlmfBn45u+xDKqoWP7YYdlyTwhUNZ4x6G1GXSo0MqNCfmv2KXNhUk5DOMbJPYHOa+dxxzb1VvnFnp30/SqQRohI/3TTZH4TskpJMe4GGQO45kdowavKrc0fBHGHw/G/vQ5+kIUn4hOtZfdgBZYK/LPj67vOg8uuC1g9SDoNtF0k4jSCmyS39gQmyAMrLxhsHChYFOtb6ixsxkMa5XTGid X-Forefront-PRVS: 0316567485 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN1PR07MB421; 23:M8Lq2TZU4Ouq8iT51Szxp6aMlomwu+0BETupEKkh8A?= =?us-ascii?Q?reVp33L9qLb52uDiWeCo0b+nMUKaPQBnxwFZpRGdhwtFHDDisvxjd/i1LG3L?= =?us-ascii?Q?F8BRRVs5+lmucAdtNR4Tl9qeinK9kFu050UJe6dmr6VrIHsfZdUk2oCZ8Izw?= =?us-ascii?Q?4u760ORPem2o+KvGWM2IbuazFfBPyUYwCOxP5Uj1pQL7GevBIQFrR8MWqfM6?= =?us-ascii?Q?KMwY66HoMTEl4FMMZ21/O3rtxx9dbE/tTZ2IRgHW2rSuvwLAsjiUoRb+peev?= =?us-ascii?Q?WyBi5YARBPXmdKE+ysaFNat7bKw5JJRa9+lQZlr2qh5i+zFCDqA7qNk4xv23?= =?us-ascii?Q?PVHTDJjIjcAvUyhO3sZ6Qv7gBSAKVfDzGZGMX4eUvEqnhRh4vS4BsI13UWJx?= =?us-ascii?Q?QRx2zzptxFUJKteAvaHQCZXk++IxQhjfjvu4u4VALiz+2GL1pdNS7q0TFkTh?= =?us-ascii?Q?zHVcJJXMlniTrl50Tn46D9GLA+zh6OV3If+VJS8t+/dXk4wLYXXAyksxeME/?= =?us-ascii?Q?UnXKRXwTPJcG8ropvJk3e7KMagDdHEa5sUz6M8JDhDcCKPFCCYh44GR6v/oa?=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BAoElTibv1ZHlDQpVSqNvDHyhiIRtUKUPJlwPeGn5L+sd+5bSbQHAd07Mfu0fVzHvYJE0fvRS9ZvYFDfTA4KpRufpf+/DsrDfwOnAyeYLRnzMOkaZ6THrHQAAQOJL24a5r4yZx304XiLIkZCxa57pGOe2HhWIQsrPyVGNq4/C1SHifAN/wKoLduKjFeosFkPVqaK2vbYqnrqWv7HnxDqfBIluiYvfL48zPjHi3SNFDM1w==; 5:+kx0nHFB11+nn3ujeZlDS3PR+TY4CFh0JXrLvS4zrf3ui72dQdBBPU2Rv0mQjwGJ+zBSU7gv/cfVsLGxBwm9xBADRyOdMAkzVzpivM7R1hIh7DGIPS+KmavtR7p/eWMinhURhtiWLPlPu2+3m3bj9A==; 24:EoJQVvvdtgKYTIwmEF2cQk1GcV3V4dm5MS7i+Z20pkCUevrlmotUAKuKGszqbcTkFbkhycFRQfAZGnOg2Oi9B6n3hVJ1PsTmSgjR7dY1Dd4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN1PR07MB421; 7:VlC85jk70TEqzsijVFFLRFDWLGReFaJ2Xz95swHQrP4CuRwnGjdRGU4dXn+Kkh+ijKC4HNGU8rJtfd3nR8e3SqpICuRNZTORuxZiGFLMztztSi9VSpRPNo9GloLHtJIrb0CAWL8+8gAEJb8WjUv+IDIlBZ8SW7vwiWnSjbGX3/fki+FlCx8/oN7XMulwNhLpQyNOIKTMurxQHrUZWK5JscZLWXQ42gZa50KpywcNw7BYimtp7mw4ZU61v7R1OxQgR0h6eQr7WbW4zAZZo2P6cpkbRuHaMQZX7T81WG0hPsE4jDr0d+yMRZwohsAPRBOzba/xqQ0K9AHcunAIjyUa9Q== X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2017 13:19:35.7202 (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: BN1PR07MB421 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 | 57 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c index cceddd9..2949932 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,60 @@ 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; + 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(lport->host), + FC_SERIAL_NUMBER_SIZE, + "%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(lport->host), + FC_SERIAL_NUMBER_SIZE, "Unknown"); + + snprintf(fc_host_manufacturer(lport->host), + FC_SERIAL_NUMBER_SIZE, "%s", "Cavium Inc."); + + snprintf(fc_host_model(lport->host), + FC_SYMBOLIC_NAME_SIZE, "%s", "QL41000"); + + snprintf(fc_host_model_description(lport->host), + FC_SYMBOLIC_NAME_SIZE, "%s", "QLogic FastLinQ QL41000 Series " + "10/25/40/50GGbE Controller (FCoE)"); + + snprintf(fc_host_hardware_version(lport->host), + FC_VERSION_STRING_SIZE, "Rev %d", qedf->pdev->revision); + + snprintf(fc_host_driver_version(lport->host), + FC_VERSION_STRING_SIZE, "%s", QEDF_VERSION); + + snprintf(fc_host_firmware_version(lport->host), + FC_VERSION_STRING_SIZE, "%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 +1432,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; }