From patchwork Wed May 31 13:33:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dupuis, Chad" X-Patchwork-Id: 9757051 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 C3E3160390 for ; Wed, 31 May 2017 13:34:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BEF1020952 for ; Wed, 31 May 2017 13:34:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B39D527EE2; Wed, 31 May 2017 13:34:36 +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 1F1F220952 for ; Wed, 31 May 2017 13:34:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751194AbdEaNef (ORCPT ); Wed, 31 May 2017 09:34:35 -0400 Received: from mail-by2nam03on0076.outbound.protection.outlook.com ([104.47.42.76]:11284 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751022AbdEaNeb (ORCPT ); Wed, 31 May 2017 09:34:31 -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=L8DNHTTyZ9QmTASSeexpVL8dcPfbH6QYlsXokFGMr2I=; b=hZ0PMwjBio6MCSH8w4rGNidtoJtkzQUVgcNvlq+UFR4S25c8tLKlqiuE0Mqw5opBXrWiWeFk3au/i2GlIObP1+2+2LI6hN+jqAxwyzL9y/Rjc7RjEOtCxQCEdfBm4osqoHcJG02Mk0IVrh+rheY/E/3oio2T20sQAiklduwBnDA= Received: from DM5PR07CA0028.namprd07.prod.outlook.com (10.168.109.14) by BN1PR07MB424.namprd07.prod.outlook.com (10.141.59.20) 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:25 +0000 Received: from BL2FFO11OLC005.protection.gbl (2a01:111:f400:7c09::110) by DM5PR07CA0028.outlook.office365.com (2603:10b6:3:16::14) 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:24 +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: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; 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 v4VDY3tj016688; Wed, 31 May 2017 06:34:03 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id v4VDY3H2016687; Wed, 31 May 2017 06:34:03 -0700 From: "Dupuis, Chad" To: CC: , , Subject: [PATCH V2 06/15] qedf: Add fka_period SCSI host attribute to show fip keep alive period. Date: Wed, 31 May 2017 06:33:53 -0700 Message-ID: <20170531133402.16629-7-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)(39410400002)(39400400002)(39450400003)(39840400002)(39850400002)(2980300002)(428002)(199003)(189002)(9170700003)(86362001)(50986999)(33646002)(5003940100001)(80596001)(4326008)(101416001)(76176999)(105586002)(8936002)(2950100002)(42186005)(81166006)(106466001)(2351001)(356003)(8676002)(1076002)(6916009)(6666003)(50466002)(38730400002)(478600001)(110136004)(48376002)(50226002)(107886003)(72206003)(47776003)(2906002)(189998001)(5660300001)(36756003)(54906002)(87636003)(305945005); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR07MB424; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC005; 1:Siwfr3LlLqE5ePjDkAzc2Gm0f4tSEG3vtzKMkxf9CBYkdLwh+1AMSi/Z3IY58B/nZ6RzGL/19WHJ9HcPx5QI5o4QD/9j5fbt/B1yhA2L6Zt+t7ocgsG1fnxGjg4mhB/cc1ZixPjvXMbCBMVwKWzSgYD+ZcKuc/446H76uovitsr+uOQouqmfB/uqHfoHPDngnwLjFhQLr8d70vRCpTMWwjWXjyXORfW74+ENy1M/srMvjEyqSZoufPMdW0HHG+4+ibw013hR6crx3LOM8+LYVLNgnCWQ9W7N5D7HnuFCwWAoe/I3hvGZfSbraKhS/RJ2joHXnQ2GnMTrGISvKMkqhQFVmCxez6myZWc1wKX1x/UhOe0eoamYDFDsGv0/2AZEBERv+2PBFX1T2p4IbHBehYCurzrilf+wK7PMUeFKT3le21rOBTgs0+3RDzqc8skRTpnANZ3rg9W43NeP+WdbGQ== X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PR07MB424: X-MS-Office365-Filtering-Correlation-Id: eb497f7c-f157-4729-2668-08d4a829c079 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:BN1PR07MB424; X-Microsoft-Exchange-Diagnostics: 1; BN1PR07MB424; 3:4EMQtrrFNwE8Vb02/lFzJOrCy5EJL+XQBF3gB2pztOQdUH3X3oMCFSmEX7PcN/W0pW3IMR7bWQ5sypvxtbximRP/bVQXEOyl+K+FauOQ9dKQ6wiqvM2Np/iCDgd3Wz72ug8RLVMp4g68UNqwhoxQ16K5Ao+BLhpmz0KmBzus84S7UyzRlfbFeBVxdgM+J0I7S+2g4fjTQAjM7D4cFpk5CpdA5NmItsVJcJNn/Zb7x62TCfjer70coN9xfdHbFjVg7Kao+dj+Yg2hU4v4JqpDeNTvBbZ/nEVcCysMynHI+RRnnQdAgNpIDb31Uqe1WF6RcsmuUCBOzC4rEXwSP3JHnQEcV4BEI+f/OW/9Ig9lrQod6ASs4BSWyiRMvXKiRP1jHu8MsL0Ffuyz6rS8Ok0p5jymzy5ttIyoZqZxxEIW+1IaUB9qW8K0CQAf3Krj04qcesFzhaC3mnNRr2n5iFBZOZmjFn6rGRSgquPT9diQJkPKlvjOcw4DOP4ZNszhGUZJ X-Microsoft-Exchange-Diagnostics: 1; BN1PR07MB424; 25:DtEmP2bwFgspsunjlqyRDbaS8+JJU81aax2hr6Y0LnuER/LKGyrsbZxvrKrq5/6zkRRCjbFAJ3n0/+yaJ0VlplcuUbVlLIo2+kT8gi3+r5FwzAwtolb9Qx2FGXuNCEm/+7GB87sbPdUQ51w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JfF8wcieAX1w0SyTvwmP3dwjR1BZ6NMAanY3g4tEwKMt7dZucll2vIpvVco92TElAeihPiea9tnI02VtAJT5AUxMWEpaxQmn X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13018025)(13016025)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3002001)(6041248)(20161123558100)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123564025)(20161123562025)(6072148); SRVR:BN1PR07MB424; BCL:0; PCL:0; RULEID:; SRVR:BN1PR07MB424; X-Microsoft-Exchange-Diagnostics: 1; BN1PR07MB424; 4:xRq9OhPFGRfCktiBexv2f2NYAYZj0Z4vq0/03LMF7vdmv77Sdi7RGNRS1QuUGUl9ECxfIp0Jwv4AzwSLoSho4PwwxEsSe8hsIXYo5Fs7ti7+F4ffzWAcKQnNF81nhF1mDWi4sJHHSOeBU49h932vVWmk4J4GLV5Xz6ppb94uklpcU2utUTiTfNwXOrZzMJUnFAKfSs1oaBe85aotrJKZvxhde2N+Go58wodT5bK4G9MLAJUhaldgPRFPfMHbTKrFi8wgvWVgTDsXWPh6sa1Jl3vsvldf41OaYfW1gxwLvdZNNDrYf/KO0kZObkO0sh3VglMpDo2dR6kcQLI15j+1Gg6wZi5wjgppeQsJZp0QlcDYJs0PSb7SyQqE+g8baECD0YMXLPP9eoQue0m/F+VTqTbQM8LEarmse+YFhWgwFrsDrlbYqI7JU760ywoK4ko79Aycl62MJXG5khuspK0TfG1o7VMeXAIMGngSjFbfb2UMCkT/syz+j0MqWQsGvENmYVFeEcRFFUh4tn6cfNEQ0RE80g5YjwFXo0iKUSjF8HSgWTt+KOccrg2KVUDfmuU4JeqDFO07SWC5v/6cGB6c8J5Ex+eiV4/4lAJX2OMrA1zItqh7O/FLLh9WzAVBrdIRN0mMJeH2nYN9TeyQR+YjkK5KOwrvKUn2oOvd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gOMKq+oRafv6ULgAY93Ap2GaJ5HYQTumGgLm3qwgLC+Af5DdYxeWi5BxqWZJp2TN/juZqCwCmiLVvzz6iKJkWGe4y107B6Q==; 5:dOqCoqwTPeCYUdBoCkiitwAG3uPHWwzEMMeIkHQIRpE9LlrInHS35oLR4xpJFWASABfb+83GSRZ86jJPmbSchUQkmtK0eGk3TUE6dqUfXvbMyb+LvOGJhIlbQLVOaU9K/aVon+OC9hXKf6gVpY4CpQ==; 24:sjFu7YVAEd16Wv8QoGCGQVMSX301O6i+b9WQx5itUjnEck8WAkV7DfRCO3VpwP/5c23GkXtewzwC8HYBBYEdr/Lpz48sxI9gOq1CSLXbsfk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN1PR07MB424; 7:ZwFu3k57gdPJ3mT6nSpWjTRbtiuCUiNn2pOOa9HGeLz7LMkuG3oG28IXnMr+PN80kB/cd8PnzKMOChxaCTjazz2ppsgReCzc2WQ+G/BeRw+xxu2KTj8mL721rS5cStbPiTQgdLFgKBdfN5oXW3MdV6PmcgaCXCrELC31Fz0jMLZ+8E4FzgWiqLNSQeHKt3cBa109EFA45Xgd2G7aHQ7eV+VEtgnsr53SnT3enB+cBO5zvJJLHYFcUi0nWFW33WlzHTW1CZfGm45yEJnFT2KiHalkaeCyccoaEpeDEFR8lcDhZ6k1EwsXnue/dA2CHAEwzV5NVhmI8KCBii0QHf3rTw== X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2017 13:34:23.8941 (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: BN1PR07MB424 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 Expose this information for interested applications. Signed-off-by: Chad Dupuis --- drivers/scsi/qedf/qedf_attr.c | 57 ++++++++++++++++++++++++++++--------------- 1 file changed, 38 insertions(+), 19 deletions(-) diff --git a/drivers/scsi/qedf/qedf_attr.c b/drivers/scsi/qedf/qedf_attr.c index 1349f8a..fa67276 100644 --- a/drivers/scsi/qedf/qedf_attr.c +++ b/drivers/scsi/qedf/qedf_attr.c @@ -8,6 +8,25 @@ */ #include "qedf.h" +inline bool qedf_is_vport(struct qedf_ctx *qedf) +{ + return qedf->lport->vport != NULL; +} + +/* Get base qedf for physical port from vport */ +static struct qedf_ctx *qedf_get_base_qedf(struct qedf_ctx *qedf) +{ + struct fc_lport *lport; + struct fc_lport *base_lport; + + if (!(qedf_is_vport(qedf))) + return NULL; + + lport = qedf->lport; + base_lport = shost_priv(vport_to_shost(lport->vport)); + return lport_priv(base_lport); +} + static ssize_t qedf_fcoe_mac_show(struct device *dev, struct device_attribute *attr, char *buf) @@ -26,34 +45,34 @@ return scnprintf(buf, PAGE_SIZE, "%pM\n", fcoe_mac); } +static ssize_t +qedf_fka_period_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct fc_lport *lport = shost_priv(class_to_shost(dev)); + struct qedf_ctx *qedf = lport_priv(lport); + int fka_period = -1; + + if (qedf_is_vport(qedf)) + qedf = qedf_get_base_qedf(qedf); + + if (qedf->ctlr.sel_fcf) + fka_period = qedf->ctlr.sel_fcf->fka_period; + + return scnprintf(buf, PAGE_SIZE, "%d\n", fka_period); +} + static DEVICE_ATTR(fcoe_mac, S_IRUGO, qedf_fcoe_mac_show, NULL); +static DEVICE_ATTR(fka_period, S_IRUGO, qedf_fka_period_show, NULL); struct device_attribute *qedf_host_attrs[] = { &dev_attr_fcoe_mac, + &dev_attr_fka_period, NULL, }; extern const struct qed_fcoe_ops *qed_ops; -inline bool qedf_is_vport(struct qedf_ctx *qedf) -{ - return (!(qedf->lport->vport == NULL)); -} - -/* Get base qedf for physical port from vport */ -static struct qedf_ctx *qedf_get_base_qedf(struct qedf_ctx *qedf) -{ - struct fc_lport *lport; - struct fc_lport *base_lport; - - if (!(qedf_is_vport(qedf))) - return NULL; - - lport = qedf->lport; - base_lport = shost_priv(vport_to_shost(lport->vport)); - return (struct qedf_ctx *)(lport_priv(base_lport)); -} - void qedf_capture_grc_dump(struct qedf_ctx *qedf) { struct qedf_ctx *base_qedf;