From patchwork Thu Dec 28 20:33:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10135917 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 9CE4A6037D for ; Thu, 28 Dec 2017 20:35:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8FD402C0FA for ; Thu, 28 Dec 2017 20:35:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 84C9D2C3FF; Thu, 28 Dec 2017 20:35: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 235672C0FA for ; Thu, 28 Dec 2017 20:35:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754962AbdL1Uf0 (ORCPT ); Thu, 28 Dec 2017 15:35:26 -0500 Received: from mail-by2nam03on0085.outbound.protection.outlook.com ([104.47.42.85]:25600 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755233AbdL1UeK (ORCPT ); Thu, 28 Dec 2017 15:34:10 -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=0xbQsmSMk+n27SO78jxUP9lU656Ymja5wwnx0EI66Ck=; b=CMS863W/kotXzY7lMw9pDuoxCsvXcs2JH2k+7HDLMCwVJomdctEvr9WoDbC4Kj79RsK2trMqCEwUJkMJWLvqJN8zLQnWhX+ts1c3XfdOZv+x5VgNfQSIMtg3lmXBstPMlaKsIryxEzJMGyf564hhozaIfnrYTt2MoHSmOyQERec= Received: from BY2PR07CA0081.namprd07.prod.outlook.com (2a01:111:e400:7bff::34) by CY4PR0701MB3811.namprd07.prod.outlook.com (2603:10b6:910:94::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.345.14; Thu, 28 Dec 2017 20:34:09 +0000 Received: from BN1BFFO11FD008.protection.gbl (2a01:111:f400:7c10::1:183) by BY2PR07CA0081.outlook.office365.com (2a01:111:e400:7bff::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.366.8 via Frontend Transport; Thu, 28 Dec 2017 20:34:08 +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 BN1BFFO11FD008.mail.protection.outlook.com (10.58.144.71) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.345.12 via Frontend Transport; Thu, 28 Dec 2017 20:33:47 +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; Thu, 28 Dec 2017 12:33:49 -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 vBSKXl0Q002847; Thu, 28 Dec 2017 12:33:47 -0800 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id vBSKXl9D002846; Thu, 28 Dec 2017 12:33:47 -0800 From: Himanshu Madhani To: , CC: , Subject: [PATCH v2 11/37] qla2xxx: Add option for use reserve exch for ELS Date: Thu, 28 Dec 2017 12:33:19 -0800 Message-ID: <20171228203345.2702-12-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20171228203345.2702-1-himanshu.madhani@cavium.com> References: <20171228203345.2702-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)(39380400002)(39850400004)(376002)(346002)(396003)(2980300002)(448002)(199004)(189003)(110136005)(316002)(48376002)(42186006)(36756003)(478600001)(87636003)(72206003)(85326001)(106466001)(50226002)(5660300001)(59450400001)(305945005)(16586007)(86362001)(1076002)(54906003)(76176011)(81156014)(2950100002)(47776003)(81166006)(51416003)(6666003)(8676002)(356003)(4326008)(80596001)(8936002)(2906002)(69596002)(50466002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR0701MB3811; 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; BN1BFFO11FD008; 1:GKqXCYEMcoESyjRiUKDKfWKHRFzoIWyeh6ItudNHnLEMSdQecpp4RmzMtNze/ZEUEX4GXE1zInt/16I6FWzpzbHJPV/Ulr7S6j5ZoVhUcPDJAdoOK01p94b8wIx8F79y X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6e8dcaf4-ce8b-4d52-2ddd-08d54e324c9c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603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3811; 20:x2MnoIRGWDYq35eA9wP3VJMPO6VOBRRfihOIKIOfjOaZ6gVLZh44hPNEBrxPQFSMvEy4+4DDTxuf2OZIf9eJb4/qYK0YsMIrBOb+kv2VjuIusWsmqQXkRnaI9bK/6NFjRPPqRmXHq5H1dMntQIVTsHRQUtIMybaM7jTteMbZypCANJ16d0SlRyWhymiB4uVqRaar6MpB1085N767C+4k7ErSHuL6KG2IYna+ICz9PMxNjhH07TSo6F6No2KrD5ZHpsjNGOkEsdJErO7J/pWNEyGItiYcK46oAfPaDPLhTfYBPPD4dB7LVPwopqah283bM1khHiOb71i5uf6ZGsnglKxCdKEIXf+fjen9AoJ5cz4BQhwpkjh2DJmmaWMNR7WpMQ560ISvYaHbr03YURppqlVDieRo+Aw2G0/+W8uGnpva7YmiHW3GjW/26SueFQUuOWznp5ONj1tNEkmfxxEWCB+0bVdgmWb7WKl70fZyXaJ4H1ZQHqIeQYc7DDAWO51L; 4:zfIOryDNHI1JbNDYLr6P3ZyEDz2shbaoqXCu4YuRU+5wvEyLzegFSVcRNOtO/+qjC2b4yaFiW5oKmD5VXK854XJR3i5xPSmtX9OlrfjDvS2IYtvjzePt1pRxDGVD99a5+Kq06X33oXqD34ow8PoamGYzDN4kFTLCGEEvxRSJ0KWuHVJV+3vmDwvSyOJZxyabRt6Ipwzg2M77VNG+9fA+XjILcT226bVwneTxDGU6/ZR+QT5jR/rP+diPWO4+/u6D8ja8eSIi/c0XDeR9SYiGRQ== 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)(944501075)(3002001)(93006095)(93001095)(6041268)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(6072148)(201708071742011); SRVR:CY4PR0701MB3811; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CY4PR0701MB3811; X-Forefront-PRVS: 05352A48BE X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR0701MB3811; 23:B/c+FMX9mJ1REm+HfJ4SCgA9W6BEnO+ZjEsfyr7?= =?us-ascii?Q?JpwwSCEXhX3z5IQlxmDPSskW0wHv2UTWuf39Mrx4r4OVvUKPk3FwF94TBJHI?= =?us-ascii?Q?PM6Wisk4rkxmADRGbDzDXF1tGCSQcmwh8CnKC02XfICo/I4cVhvh19bHVOod?= =?us-ascii?Q?7eAOF/r/7XmcOeAQ+2+9fCGSlA6hftTu0aaWLTyBITX3ZeX41dxHyhBoG5OH?= =?us-ascii?Q?TnDNhW9P0v2ELtUDUdquktknEo/Pu3KMKuC1NXXCkeNxmkQfm9z8A0KKiixI?= =?us-ascii?Q?pMcdGeIYl6hviyhw3QFmnAeS+dSy4aQ1mLigZNTXCj/NnmJJLIgqHay1yN1C?= =?us-ascii?Q?bjsLtTrmTtY58AZSKryxap0KEB6UuXWJdWcKDoqYKegbeDv6SfVUCrRRO3Ot?= =?us-ascii?Q?tFrRLhJUkZ8ZbfVfQnx22cwILQO16vd1W7iKESNmZd3aRjTf+C1Zs/fV+H4g?= =?us-ascii?Q?YjvPru87SIJfJxO6N/DEIbkwXgfKuUkY1K/zxGK5xQxtB8hgZHCpSESHaNF/?= =?us-ascii?Q?PCDX0Gxzk0hl/m2Z98RJ5TsXM7+qq7VKlej6SwB0bMrZrBhyPLBFtzrTKNtH?= =?us-ascii?Q?ynFWJhVN8zYCrYyJl9r/iX2qlFatybtECudgejH9zBmGvsMQ5ipd1MYEq6De?= =?us-ascii?Q?xXCL7RTTf2DVGU4ci+k/bDp0vk6yBgrgyQcuaiwOSdQN/BIOQ7HV2r26Mx/r?= =?us-ascii?Q?OSCgZyXFfEp+XUbDE53nRZuw8qawMDrPkfGCANR7qqTb13mRdoEb/ZpPNujk?= =?us-ascii?Q?JaKT9b6IqUUiQkmjx/NP8UkT1Klcm7Of8+423vJClTmTJkITXk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1r4EKvFE8ZXvqxZa8vTA7iDXzoe9FFabeNXkK8qazxMGmLteehN38C82DneAk47XJ24A8T2VeQrm1sKpLQWtyWuefQydu/XRpaysXj14tx3AS26CwBI46W/XF1+woL0Sj2dmvFqNGtUsZ/sNFWt9L0u SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Dec 2017 20:33:47.9996 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6e8dcaf4-ce8b-4d52-2ddd-08d54e324c9c 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: CY4PR0701MB3811 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 cf1f1a3baf21..aabd49ef95a3 100644 --- a/drivers/scsi/qla2xxx/qla_gbl.h +++ b/drivers/scsi/qla2xxx/qla_gbl.h @@ -148,6 +148,7 @@ extern int ql2xuctrlirq; extern int ql2xnvmeenable; extern int ql2xautodetectsfp; extern int ql2xenablemsix; +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 728c66f34666..39d1edc6c2b1 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -3348,6 +3348,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 e1761bd552fe..487e1affacf4 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -277,6 +277,12 @@ MODULE_PARM_DESC(ql2xenablemsix, " 1 -- enable MSI-X interrupt mechanism.\n" " 2 -- enable MSI interrupt mechanism.\n"); +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 */