From patchwork Wed Oct 11 20:36:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10000621 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 EE5416037F for ; Wed, 11 Oct 2017 20:36:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2BE128B37 for ; Wed, 11 Oct 2017 20:36:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D763328B69; Wed, 11 Oct 2017 20:36:59 +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 60B7D28B37 for ; Wed, 11 Oct 2017 20:36:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752457AbdJKUg6 (ORCPT ); Wed, 11 Oct 2017 16:36:58 -0400 Received: from mail-cys01nam02on0070.outbound.protection.outlook.com ([104.47.37.70]:23949 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751866AbdJKUg5 (ORCPT ); Wed, 11 Oct 2017 16:36:57 -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=hNJVVu2aEddrI6iRsCEPHhVDYmNtjR4xelzBj8GFmpE=; b=FqdijCq3o80WsWH+RYhXrgY66TU7kIpmY7Q0WKi5gCHGBskPLQ9TzzdsAN9EY+TmLYG2t2PtMcKSXEtwEuKWx60szD2VhBMsbG+U6SiDx/mQoeS8MoPThKP9b2KvkDq1YJ4TcaEyUFDdQh3N/pYBHT+FUCqxTatD7i6Yv940RvA= Received: from CY1PR07CA0015.namprd07.prod.outlook.com (10.166.202.25) by SN1PR0701MB1952.namprd07.prod.outlook.com (10.163.131.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Wed, 11 Oct 2017 20:36:55 +0000 Received: from BY2FFO11FD044.protection.gbl (2a01:111:f400:7c0c::183) by CY1PR07CA0015.outlook.office365.com (2a01:111:e400:c60a::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7 via Frontend Transport; Wed, 11 Oct 2017 20:36:55 +0000 Authentication-Results: spf=none (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: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) Received: from CAEXCH02.caveonetworks.com (50.232.66.26) by BY2FFO11FD044.mail.protection.outlook.com (10.1.14.229) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.77.10 via Frontend Transport; Wed, 11 Oct 2017 20:36: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; Wed, 11 Oct 2017 13:36:50 -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 v9BKaoop023668; Wed, 11 Oct 2017 13:36:50 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id v9BKaoiw023667; Wed, 11 Oct 2017 13:36:50 -0700 From: "Madhani, Himanshu" To: , CC: , Subject: [PATCH 1/5] qla2xxx: Add module param ql2xenablemsix Date: Wed, 11 Oct 2017 13:36:46 -0700 Message-ID: <20171011203650.23629-2-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20171011203650.23629-1-himanshu.madhani@cavium.com> References: <20171011203650.23629-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)(6009001)(376002)(346002)(2980300002)(428002)(189002)(199003)(5660300001)(50466002)(101416001)(47776003)(50986999)(305945005)(48376002)(87636003)(4326008)(106466001)(76176999)(189998001)(69596002)(356003)(72206003)(50226002)(80596001)(1076002)(8676002)(6666003)(110136005)(36756003)(16586007)(33646002)(105586002)(478600001)(42186006)(54906003)(2906002)(5003940100001)(8936002)(316002)(81166006)(81156014)(86362001)(2950100002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR0701MB1952; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; PTR:50-232-66-26-static.hfc.comcastbusiness.net; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD044; 1:2niQJmi3b/8sLPzRxIVoKr45xcAm8TpY76o5sSUqwHjJn9oTHd4t2Hq+ahdvfT9wgDLFqeyo5Wp9ga8sG47dvRGk5PUGAGK7B/oefaedbRR62K6wtgNbYtJK1uYbWGdb X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d13f8145-ab38-4ac3-74e9-08d510e7cf85 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:SN1PR0701MB1952; X-Microsoft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YlVacm3QDRp+IYUHbueWeYEt9OQ6lJXUtPT8hwDWT1ZgyLxcXDdc+mD+8JWWQy/Y9nGJa1C7PMxaFX0Z/NuDgIMzj9YNNmpdBSXlvuI5whdAu1ZpbWuMgOLZycAiXXELdsNrNIMRkfDIJiKX8kVc3NR0XuMqnIOjBjIz0XUO35CJhqxAzC/bBwL1umgtiY8S9NdboT8ghAwZPhq/eihM1r48isBq4bMm6c5ioEJ4+QK+j1UF67pV3Ktxah1dBuaH+0byh9uBwtuYlBUOfnwO5N71cQdFYdM5s4hStWFj9dcGwtpY5EFIOuAt64rGHGd+ENsiN3goiLxcBlWAFmWIAWwnDd/w/mGIwzkvTBNFoXN5E2rNsyQdR/Gs/Lz6q/s6m39Lq980Q8Q/q8q32yqDc/VC3Z4cIId95s5MmB7JUx5Aq+I9kFSOEZ4vRa4IjtL7dMjGfN+Kc63y6fAcjOkr4yDtU89mGHlj9CkWlNUYcYRfP/4Y0VFlW5nJrl X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(3002001)(6041248)(20161123558100)(20161123555025)(20161123560025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN1PR0701MB1952; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN1PR0701MB1952; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0701MB1952; 4:ocQbO8w1fiPmznsnd+qnNntmvX7O6B2huSvCyO1mt4sRL+oxAiMNEqZJ4lnA0wshQaE5CzP5TmqdPU+JWlHDL+4V20Fd2gxxIeDDpSRm3V4+mAmdpFYhhXhoA8sK5splnSLfQd+GfR8sCJ4+Zc204OpLIeSCqTTstA48lIeoXplzamSRqKkeoeT2Nfo6xPAdJ3cU8pCsHPcmKV3A7Vr/klzcqgh0t0b6ig9hY9VeihdKqiUssmuKtArT/jHIN3DT X-Forefront-PRVS: 0457F11EAF X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR0701MB1952; 23:w4myvbVpU9qC0X9ZCHQAYRW7+Tqa4BwjObk2XTD?= =?us-ascii?Q?2OCjNqOLpZrabaNaTm10RlHNCCA3I03BjFUhc916aANc2pzbiuvF8NHrnXhi?= =?us-ascii?Q?8ae1NiGlhn5wi5lFn1wTYJMssVVnGUysATw3KT32XJqhHWOV0i6Uselaqd5X?= =?us-ascii?Q?VmdRDXF45xH5sT8f63TaP9vE1vqjHAMaMz3ty9rWIWKqMRmT5loxTOSyuzSj?= =?us-ascii?Q?YpkWeA0L1M2raJRa5jlPdhnQDgMrJUZG38OloIb3pdYowzykioTbGzDZeZFl?= =?us-ascii?Q?XGPnXYx/wLCTkuWjxpwbH4RDJYA/ScrwAS+JYqF5m1DHAUJofLFAlDiTJhjv?= =?us-ascii?Q?2RlFHdjeosYhCFgPrIFxOq148YKtRoZx+xTJ5CiYyFY7cB5HuxOun8wwyxeY?= =?us-ascii?Q?PYdj8foW7jqv4LprWZqR+9XpXkAPhKp8BXgfDCWZLYC4b5pGkaE1Uhxm7Iy5?= =?us-ascii?Q?rwNPMVpTYF+ZnZ4hYvl4n3BuwQJIHfNgP92GsV2DSpD9+oTKi7Dl/w5fdplP?= =?us-ascii?Q?qiuBrgc4Hcsc+m1/9KXztj7ascpOjyKXBUXSQ0nZDExNAgjRmcgsyJd01kh0?= =?us-ascii?Q?nYMfLc4odLdl0+rjnxP1rUWtnlORiplES6U9FT6eNqureDlS3lEEfLTrFcTA?= =?us-ascii?Q?U0FCLNs9aIk4z7w5/xrdINez7MfjDHKV9roH8Bbh8Q2JftfEK/heZ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jVVMMcW4xq8201wnCd9mUZE/IWT+BiEWCik4re/0U=; 7:c3Z2+4eWcdQdKddQHbVrFpqehhntJ2R8TFjXI59IIPmphGBrGFsl7SE2CMlEUUvWkm5nw/GBB0B4smj2n6gCVNn9xkMpuzNUl4zRBoG6RNqiYllLsmcnin69tXmmvngr5Imc4hkqAfLBcBG+IQU9QWYjjkpX7F9kcGwGCEV2z+LsYNDXLCGcJrqf+GguXheulUkkWrlTEMoWgLSz6q6+VkO9rkLjcyXaLWEdWE7Fxhk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2017 20:36:54.5728 (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: SN1PR0701MB1952 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: Himanshu Madhani Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_gbl.h | 1 + drivers/scsi/qla2xxx/qla_isr.c | 9 ++++++--- drivers/scsi/qla2xxx/qla_os.c | 9 +++++++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h index f852ca60c49f..46c7822c20fc 100644 --- a/drivers/scsi/qla2xxx/qla_gbl.h +++ b/drivers/scsi/qla2xxx/qla_gbl.h @@ -145,6 +145,7 @@ extern int ql2xmvasynctoatio; extern int ql2xuctrlirq; extern int ql2xnvmeenable; extern int ql2xautodetectsfp; +extern int ql2xenablemsix; 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_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index 9d9668aac6f6..ef7afd5eefe3 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -3486,11 +3486,14 @@ qla2x00_request_irqs(struct qla_hw_data *ha, struct rsp_que *rsp) scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); /* If possible, enable MSI-X. */ - if (!IS_QLA2432(ha) && !IS_QLA2532(ha) && !IS_QLA8432(ha) && - !IS_CNA_CAPABLE(ha) && !IS_QLA2031(ha) && !IS_QLAFX00(ha) && - !IS_QLA27XX(ha)) + if (ql2xenablemsix == 0 || (!IS_QLA2432(ha) && !IS_QLA2532(ha) && + !IS_QLA8432(ha) && !IS_CNA_CAPABLE(ha) && !IS_QLA2031(ha) && + !IS_QLAFX00(ha) && !IS_QLA27XX(ha))) goto skip_msi; + if (ql2xenablemsix == 2) + goto skip_msix; + if (ha->pdev->subsystem_vendor == PCI_VENDOR_ID_HP && (ha->pdev->subsystem_device == 0x7040 || ha->pdev->subsystem_device == 0x7041 || diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 5b2437a5ea44..e69329cb3608 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -268,6 +268,15 @@ MODULE_PARM_DESC(ql2xautodetectsfp, "Detect SFP range and set appropriate distance.\n" "1 (Default): Enable\n"); +int ql2xenablemsix = 1; +module_param(ql2xenablemsix, int, 0444); +MODULE_PARM_DESC(ql2xenablemsix, + "Set to enable MSI or MSI-X interrupt mechanism.\n" + " Default is 1, enable MSI-X interrupt mechanism.\n" + " 0 -- enable traditional pin-based mechanism.\n" + " 1 -- enable MSI-X interrupt mechanism.\n" + " 2 -- enable MSI interrupt mechanism.\n"); + /* * SCSI host template entry points */