From patchwork Wed Dec 20 06:56:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10125069 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 DA5426019C for ; Wed, 20 Dec 2017 06:57:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D10C629649 for ; Wed, 20 Dec 2017 06:57:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C5DF02964F; Wed, 20 Dec 2017 06:57:22 +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 AFEEB29649 for ; Wed, 20 Dec 2017 06:57:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932476AbdLTG5U (ORCPT ); Wed, 20 Dec 2017 01:57:20 -0500 Received: from mail-co1nam03on0040.outbound.protection.outlook.com ([104.47.40.40]:43985 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932412AbdLTG5J (ORCPT ); Wed, 20 Dec 2017 01:57:09 -0500 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=lkNrbUJBM0869lkWjP6DiumhpLSN7FmOA7F+J/UvwGM=; b=ElpRcP1RLvkSzrsRkKfyT/LF3rsp5wDBqIc10kdVGhAAo01uuOTJXZgtIXy4lr6QOBH8PevrJ/A3VvVFTbzFHM9L/qj1hzOOigz9k4x4qpKOrdymKxfX+TijcIBRwUheDcQ79OnvIxe/zle2+zdYHUtntdMLsJcX8EJZjwtrytA= Received: from SN4PR0701CA0020.namprd07.prod.outlook.com (10.161.192.158) by CY1PR0701MB1947.namprd07.prod.outlook.com (10.163.141.156) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.345.14; Wed, 20 Dec 2017 06:57:07 +0000 Received: from BN1AFFO11FD027.protection.gbl (2a01:111:f400:7c10::106) by SN4PR0701CA0020.outlook.office365.com (2603:10b6:803:28::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.323.15 via Frontend Transport; Wed, 20 Dec 2017 06:57:07 +0000 Authentication-Results: spf=permerror (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=none action=none header.from=cavium.com; Received-SPF: PermError (protection.outlook.com: domain of cavium.com used an invalid SPF mechanism) Received: from CAEXCH02.caveonetworks.com (50.232.66.26) by BN1AFFO11FD027.mail.protection.outlook.com (10.58.52.87) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.302.6 via Frontend Transport; Wed, 20 Dec 2017 06:56:54 +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, 19 Dec 2017 22:56:47 -0800 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 vBK6umX2021602; Tue, 19 Dec 2017 22:56:48 -0800 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id vBK6umxD021601; Tue, 19 Dec 2017 22:56:48 -0800 From: Himanshu Madhani To: , CC: , Subject: [PATCH 14/43] qla2xxx: Add option for use reserve exch for ELS Date: Tue, 19 Dec 2017 22:56:15 -0800 Message-ID: <20171220065644.21511-15-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20171220065644.21511-1-himanshu.madhani@cavium.com> References: <20171220065644.21511-1-himanshu.madhani@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)(346002)(396003)(39860400002)(376002)(39380400002)(2980300002)(448002)(199004)(189003)(76176011)(50466002)(69596002)(478600001)(1076002)(72206003)(48376002)(87636003)(36756003)(356003)(85326001)(80596001)(59450400001)(106466001)(51416003)(305945005)(86362001)(4326008)(54906003)(2906002)(8936002)(50226002)(81156014)(81166006)(8676002)(2950100002)(6666003)(16586007)(316002)(42186006)(47776003)(110136005)(5660300001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0701MB1947; H:CAEXCH02.caveonetworks.com; FPR:; SPF:PermError; PTR:50-232-66-26-static.hfc.comcastbusiness.net; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD027; 1:2g4b2oEv6eA/OWop5Nea2WnT+6UzdxSc3SgX7ljBT/6tuGeOnz2IMwAOvZPONZ+P3Sr8QCjG/wBkDrL2C1362c8KwuQ8TxJhWjgJc4bdFdfgGuO21RjJz8OTQAlJUwxQ X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9c742394-9e7f-42c2-aacf-08d54776daed X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603307)(7153060); SRVR:CY1PR0701MB1947; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1947; 3:R6jRV+hi1sYMz/o2KMmCOaUpaE9bAgJLOkjQvmy/QavZkpJLadQowcqnCFyO5crn1oFhUi8NXtZx7lETEasAk1E6lntxKvf5f6Fxylh59NOl3bj7uze9wrS3Oy7NwwqP38xMK0V1M6Scc6o97oo3ZwC83K1zlT7OSareNsi7CZWaHw5qMcqAqYif7Vgy47u6vB+4EVYyMFt98JfCOzELFBBIN9JU0cNnUrNmkgLSuJy/hCTnwQjFlbwDoCHesH6B26oV+4IpowcLTzF7XJ9KdZw0MhjQcON8iO+0uqok1TGUfySVoVKx2c9aexftpF7n6J602AFT/p5fDCiG4MhkfPk+UrapB8+FXkBzlxl7HrE=; 25:Od1kP8HThvRxjL9ZJbhHUmw7xYH634IGive1o4HRfqLcDqc6weZ7QFWTSxkLn5KB+/yMBKsEpjmx31R+cqVxnhn03rV2JyBkJz5RgX03yt+KfmvzTk5wq/cCo5Qqq+UHCmP64UE5nVEJpAb66fU3IUxHP3AU7y+azWZfL3zT/RF/BzALE0NlAMKjyZpOBMIuh3FjvCBejHlAPiw0sDmKlDrFUOMUd5r8nz9shqd6le36IzgMwvnm5uvKkrh7HI/ux71cEsZO9mhPENPpgBS81203nLT/YfXcq9e9JJeeQA78roTZi7OHQYuTaofu+SRTxMl4Tk19woNqYgE80bPRn4yYjuMODwkGGdf7XQ/HCEg= X-MS-TrafficTypeDiagnostic: CY1PR0701MB1947: X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1947; 31:ZvpV/mpDS7ln0OAt3x/klsO2XchHF1JjZ7V9M0ibKzNurlqp585o3Jb0DnEp4kH+iAUjQhsHmayeZyzZeY1zciiwbK6PH18MIEBuDu9FD24o8AV6PGObikkwvLAOaBF+HYKB8mGrd/3weCI9IRFz1rAb77DkpM896BLDXOf9u86L1oHgo8u4KoLj8Q4KqItiLBEgl9oSxWay9+LZdP/q5I/+xa49kkj5/hCEVxEz2Hw=; 20:rhXKmz04D8+Q1og+OWe/FNu1PnM7glvHCbaNc86WRf+t1HJNi/35eitRzYjcI7FwqnfVA34+bPG9RYVsX5+qmqnKo3+yyCRWOUSZAA/j/CfEWRGxjtB4n9zF677E4SdFHAqc3JfaRyAFy1XF9IHn1xREASnQuoNN1K3kGDrjzir4xrTWs1cwdzPLhx9wRKsOl4RtGKEYSSvTL5Sze05CogSgAi+ZOh4SyIwaDGkFYZuwKd7NfoY2KBThAJQm511aZXVf7wVi6KviMGFFjr6wauGw4yJ7cE06jECiI/U+BH/lk0mPplbDb0//pmLlZrqFbYxosfQBqjMLChhQYoTplGpL6N/JWKusGWns7eFX35bEpOPA7sV/gRxYJLfrCFtkauwieRsN0K+oZSjKl1viJBAOdpq3n+msKF4wXjFWNUjMD+9dRY1J5iLmcCEhEKmkavHEht69704qSaYFrLSwlxesoNXGjd1Te3My4KUZ15gijadjbb4UnI8B1TPWU8cb X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(5005006)(8121501046)(10201501046)(3231023)(93006095)(93001095)(3002001)(6041268)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:CY1PR0701MB1947; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CY1PR0701MB1947; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1947; 4:JlO/q1qwWrp83KfATr98L0P06XI+qgxT7uQKgC8pFbeTixByEl0R8nW/m2S0PdCl7Xyh4iVmMa7D7oB/3baEtklk+LB3u5cHWkKsXBDISygFR1twGw9OyGi9OnNRy84gf3yqzlI0cbN+XmzxCNLwzZ/EI5a3gwxeHFN1raY0Kjk3cqCXil9hZguk80S9yLqxtHyElP5QiTRScqEebHAnG/NjPmtRldtt2aSpKcVI+zVUphd8zqFJBzULP+cXpwUXK+eE6/ZgYHTNkNUz/9F1gQ== X-Forefront-PRVS: 0527DFA348 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0701MB1947; 23:spmix4nEvDdRJPFM9Id/3LUGCTam3FlCIXaAjbq?= =?us-ascii?Q?Mjo72TjALi3pfrenMacW6tbcHOBEeg4VHlR3TuRbI4QKNWU+c+lbzi5PKYNC?= =?us-ascii?Q?Xpg4hnOTa5yBPJgpbf0amoymXmoewVlFoxslvIpUn5Vofhxeia6G/fVHwz4X?= =?us-ascii?Q?D4KwkxEi5PDKlsQbRthK3q5SHhRI+P98Mro2vwghaHFCdvI7lIEBSir5XkzE?= =?us-ascii?Q?k3ugcadF4MRehT20+IksFWw9+dqUuOyMfYO2+l8ymAleBc7eLLrZdYpiApye?= =?us-ascii?Q?TQJJ162T80VxA2TpVTxKAjRE043dRju7Rey4can24SSAsyO9tBCpzsRevVFu?= =?us-ascii?Q?RVeee2wbELzdAQKG/sqjDAot/LsiapNj9My8YIF9zsgCcm2++DN985QDkdyi?= =?us-ascii?Q?sKnXUXPlhrZRzhZGT9EfCQc41ZeV13ZcI4VjMiqRbcfXDi4KGLkG5NDSzoIk?= =?us-ascii?Q?vpXcNCcEIOwp+cfMY7a9fwF+PnHuPWu5LP4NlRpptH+xyx1ZthKHN2LCYvYK?= =?us-ascii?Q?QNqx8gPDrYAORbc/fsscszONE1AddcXKI4V5i7KQifY0k9zGlKvMmmFiahBl?= =?us-ascii?Q?wG4zxs3QSSD0jN31yPzmMBG8fIOsOLhDrGx0zvpypTZcZ35EhXpmHbc65HKQ?= =?us-ascii?Q?k4oEFDWHqMwFabmN1mF0+cAbm24ryRGucxiq0Z0TjDXb6XqSl4gxYLXXOMug?= =?us-ascii?Q?UvHniMKjFt5GPsKcDLCyckfJfs/AAvkyD1nuFbUHZBIpw0mI0Wwm00W5EzpF?= =?us-ascii?Q?fSLF+pByJAe+7wufO5i7H3Oh2jhLdwlQYS+Z8zq7BHYSsyK8t0lKvozz1uIF?= =?us-ascii?Q?2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sOMDjjC5+IIJFZO34qPQpYMqfhY/HSapP9WesYzNa+hj9fzsYDRCbzPbwqyUo4Nqs6GyavsCTxlVAxubpK+MJIF2RbkMHexGfB54tmBrmA2rawQVHF6yWgJGz SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Dec 2017 06:56:54.4083 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9c742394-9e7f-42c2-aacf-08d54776daed 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: CY1PR0701MB1947 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 From: Quinn Tran Add option to tell FW to reserve 1/2 of emergency exchanges for ELS. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_gbl.h | 1 + drivers/scsi/qla2xxx/qla_init.c | 6 ++++++ drivers/scsi/qla2xxx/qla_os.c | 6 ++++++ 3 files changed, 13 insertions(+) diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h index fb1c9ffdc05a..88c7746c023a 100644 --- a/drivers/scsi/qla2xxx/qla_gbl.h +++ b/drivers/scsi/qla2xxx/qla_gbl.h @@ -149,6 +149,7 @@ extern int ql2xnvmeenable; extern int ql2xautodetectsfp; extern int ql2xenablemsix; extern int ql2xtrackfwres; +extern int qla2xuseresexchforels; extern int qla2x00_loop_reset(scsi_qla_host_t *); extern void qla2x00_abort_all_cmds(scsi_qla_host_t *, int); diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 61b74fd220a3..6223dfe20767 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -3387,6 +3387,12 @@ qla24xx_update_fw_options(scsi_qla_host_t *vha) ha->fw_options[2] |= BIT_4; else ha->fw_options[2] &= ~BIT_4; + + /* Reserve 1/2 of emergency exchanges for ELS.*/ + if (qla2xuseresexchforels) + ha->fw_options[2] |= BIT_8; + else + ha->fw_options[2] &= ~BIT_8; } ql_dbg(ql_dbg_init, vha, 0x00e8, diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 66e6fe73a035..fd107c4feda5 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -282,6 +282,12 @@ module_param(ql2xtrackfwres, int, 0444); MODULE_PARM_DESC(ql2xtrackfwres, "Track FW resource. 0(default): disabled"); +int qla2xuseresexchforels; +module_param(qla2xuseresexchforels, int, 0444); +MODULE_PARM_DESC(qla2xuseresexchforels, + "Reserve 1/2 of emergency exchanges for ELS.\n" + " 0 (default): disabled"); + /* * SCSI host template entry points */