From patchwork Fri Oct 13 16:34:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10005287 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 17F8E60230 for ; Fri, 13 Oct 2017 16:34:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EFDA327F89 for ; Fri, 13 Oct 2017 16:34:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E0E6B2851E; Fri, 13 Oct 2017 16:34:17 +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 75B0527F89 for ; Fri, 13 Oct 2017 16:34:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752006AbdJMQeR (ORCPT ); Fri, 13 Oct 2017 12:34:17 -0400 Received: from mail-co1nam03on0072.outbound.protection.outlook.com ([104.47.40.72]:54601 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751964AbdJMQeN (ORCPT ); Fri, 13 Oct 2017 12:34:13 -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=zMUv5xF6prpzWA7qfBgSwegtUfA/H7021OCynlKnmqg=; b=HwGioAs3aEys17WQvoEjqLvLukbpPZI1ab8H5oh/hx874JKX284SbtzzdnWmrOZLH5zMBaJkR47pRA1vbFY1gtEdCkVMK4gHIJzx4/dQt1Hz2ApsuvOQr+hfdFnTfFq8X9W7rVb/uweHnWhUdoNsy3+xLouXvm2FFeUhFMrp2iw= Received: from SN1PR0701CA0033.namprd07.prod.outlook.com (10.162.96.43) by CY4PR0701MB3811.namprd07.prod.outlook.com (52.132.102.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Fri, 13 Oct 2017 16:34:12 +0000 Received: from BY2FFO11FD036.protection.gbl (2a01:111:f400:7c0c::105) by SN1PR0701CA0033.outlook.office365.com (2a01:111:e400:5173::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.77.7 via Frontend Transport; Fri, 13 Oct 2017 16:34:11 +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 BY2FFO11FD036.mail.protection.outlook.com (10.1.14.221) 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; Fri, 13 Oct 2017 16:34:11 +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; Fri, 13 Oct 2017 09:34:08 -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 v9DGY8ci008077; Fri, 13 Oct 2017 09:34:08 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id v9DGY8EF008076; Fri, 13 Oct 2017 09:34:08 -0700 From: "Madhani, Madhani" To: , CC: , Subject: [PATCH v2 1/5] qla2xxx: Add module param ql2xenablemsix Date: Fri, 13 Oct 2017 09:34:03 -0700 Message-ID: <20171013163407.8038-2-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20171013163407.8038-1-himanshu.madhani@cavium.com> References: <20171013163407.8038-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)(346002)(376002)(2980300002)(428002)(189002)(199003)(72206003)(6666003)(50986999)(69596002)(2950100002)(5660300001)(16586007)(316002)(5003940100001)(36756003)(110136005)(42186006)(47776003)(54906003)(87636003)(478600001)(80596001)(101416001)(50226002)(76176999)(4326008)(8936002)(305945005)(2906002)(50466002)(86362001)(575784001)(356003)(81156014)(105586002)(106466001)(33646002)(8676002)(189998001)(1076002)(81166006)(48376002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR0701MB3811; 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; BY2FFO11FD036; 1:RcLmvSHjp9vDJkl1ontxCyeUpmorFyDKnnft477Pb6xHYlYZC4c98IhiqilKWeEt2Np19BFS0OcAPYlM5dURL86VBpxlaX+rW0ArU27jHRTRZNf1jETS6eTIcZhUw1sM X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 67f21cda-bdb0-4c7e-0450-08d512583c21 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:CY4PR0701MB3811; X-Microsoft-Exchange-Diagnostics: 1; CY4PR0701MB3811; 3:4D2WwaEpRXLkDynv2UVEfrAXeQ2pTAv5/2jRRlDnWUrlB4WOp0Uu7GSmR+f4+yWAdinTT6OU58xGYxNE68yB719tBC9YNghJgkinJ6HBAyvqR3mZTSCgPSOJQ1GO9sNx/6vA0OKL3LQjyZJ06yTyja/xdCWtFy50sM4v94hpKpmEymNcvC6XDuTkhRia+XItuLKWW6rjpF/IKEf8D1NZJMvRjPoQvwuxsyE3ZaScwT8xJQwd8ION/7V//UKvn56gySuSQ/6dqZy0rsrch7veMlVEbMS45JzU8leqn/eYZy4oAc/xZb0zMP1UMFgA1UTSahX8p36pNHUzInUrqoxir71JZAPaddZAqvJazoImam4=; 25:Laf8DID+1opH7DLt8ROBzQFEMdXdXw4vXjMhoJs/gs1iNFzF8khKJQpgXV5tX29Ki+eWbQMiCtjR27mhmeP6uM+1Q5/0ReotssczMT8vLxqgYsonGmd+iBWQGgOYoutgi7HPCQLwsq4xVMazKJrc0twvJl5326voKK/Tk7ldpSyx3CNbaNP0UwLNma+hzJxPfc1mT6ilyjdsoKuPbSGgEHFv9Fjf1DM/syhgtOkFyMjNG8FHnAvMQPbnOdis3jv5YbLgrvdPMKSIXxEUNdfLcQztPbVSCohNawyEfANbwMRstrlRzxoHaNTJ81I5U8SCaykNP93OP2VszW5Y+XQg8A== X-MS-TrafficTypeDiagnostic: CY4PR0701MB3811: X-Microsoft-Exchange-Diagnostics: 1; CY4PR0701MB3811; 31:eraBGYB+6e49G/BhJ3FiU4KumNXfz6CCl+tKNzBGfLpZkmSvrAx7QFx5ey41u5MChcixpkqQM/GTPKygR+V45/85MdWvECFE0N1G4K4hKt2ZC9+16YPus8ln5Ui+W/cCXaF9uyxzRiyXtax9hKxlYu5IaK/FV/vU267Lh84yzwhfnxqDDct9e/oe1+DBARG2EgtkMYxSwZ+SqWiU+iz6FnviPyBbuqEUSYIZrpAbMic=; 20:Iigsm3IK5n5TkLA4cCtY7QFGvTHGOwwePkOVNLyNw+jJStxrSAbk0O0/f8FSWLDDHBcG0LeUJ/Bxm4zBWykmefWKZAFHYrpKroeRgNYijKPMd3PLpR5dPRNF2mI4EsJAH2mq2tP5kRiQDbw6vT+yiImAiFALMzdyNlChDtjTItPNQg2OEcCOEuNJ98Er7ubPO8gfhECPiuBUYctKOeAsoTH6SqjxKGRcEqwOFn+uvFqnlCdtZ01CMGTZ7wHn5w3facLSspwEHcCGuUxVODHR02AQqAi7zN9zng2s1Xc/4h8rGgb/RZBbrjwKh97UyfpNU7UcddcRsrFzkt5YU/YzFH8vhXwT0WN9UFO7QKX8izLEhOGVc5nFM4B5yzn388V1IGajeF2d5fpZF3vT1xd3nYMgx7rxFlBnNnK7watuLbhMpxpcSxsi+MX/mKl2eeETFd8YsdflFO0N6RaZ8GYU2P0QhmA1zs1oy1ZCl2e3sCVfSvEWAeWTlJLwUQBMXNt9 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)(8121501046)(5005006)(100000703101)(100105400095)(93006095)(93001095)(3002001)(10201501046)(6041248)(20161123562025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123555025)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR0701MB3811; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR0701MB3811; X-Microsoft-Exchange-Diagnostics: 1; CY4PR0701MB3811; 4:0WZPUFcblY1XNe0kfXkUehNMp5zNhQ1uMRKLWdeeWxf1Gz03v2NHq1a23GivW6AXAEC4a4fwjY1uRtuPFlU2BR1eKcB7AYumU3d3f/Q6fTlUSb1QNzASqA/HyCTWlGV2bamhjfz1XDHGAJyb7XOdSrbgr9Q8awmcbXkDqXHZK+/xx0eCckauwewR0GlaArWYjm6pERckXu194Fu0thlwf2sN9jKBXSQHP6/UmIM74ug2lIRxBq5W8b2Tb9NGLA13 X-Forefront-PRVS: 04599F3534 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR0701MB3811; 23:jwSVFK08xldZgV+qy8l6zk7/v/po7/dnTWM28dK?= =?us-ascii?Q?SEjUQRj9xz7FkFNkTz5NqziC1KvsyS7sro0ufKweRmapZvaMWkt/LAYwTBL/?= =?us-ascii?Q?nuKeF1d80Lw4eng/bNLnRR8z4IsAffl3IPuLWt7+ZTdu4vODc1YOQtJJMgaD?= =?us-ascii?Q?c5huWmXZzst11EqHMsrey3ORre4miUUeydP8fal3SMO5yIRvSi9RNzpB/dj5?= =?us-ascii?Q?V7EXr9IMrkG8KGTvgf7BW5GpZCrMUhyxNNk7qPNKRMC4dMMzLgPDHJYDclGo?= =?us-ascii?Q?0JOQ4z7U0GoMp5k48O/+P4X7uqv5CFVUt38GelQfapnoGhWYDen38sdZBgWb?= =?us-ascii?Q?OTTwb+4TiQ+WLbmxIL4QRQ+FfXDglJZpwfor02aSMKIg0Gdn3z4LrpNTLeJz?= =?us-ascii?Q?3ZmsEylPhY09KusGKwzfR9lKct1sPrhqFzhfny2W2c53IS/tFj4v2kj1YJPq?= =?us-ascii?Q?YJIbwtuikBKngyCVffUnivCS17UqvTxtHwZ23P0+E+7fudq9aqNKhXKCQwmF?= =?us-ascii?Q?VXXGRf7qb60AqlGu3a6qkIJfkJIwf/nxKrD8H/zhGg2zPYZhjJlekEd8JoOg?= =?us-ascii?Q?at/0PyWBj2C1r6whBt2zbMiI0IJ/sFUWwD6vd6oMCu+j2gPo8Y8izyz0SCtG?= =?us-ascii?Q?rmnH1BTLIdqgjWfQ9x7P/F8PC/C/mMBqdYqrFKV7U77kycTbe43hyRFVRWTv?= =?us-ascii?Q?Cg7g1ZVpwBZwge0Y+Dy06iGh6crWxzeEGqlaLw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SR1h3T7MJAvCvy5Jec=; 7:2mAcyx9Kxu7an7F4LAWT85Vn/WaLRF2MRoQgnRpxe2yFBweJVFhMFfjkWn43bAFepq6TjyWEDgDZsvrmyM2ph000D3THujfGDKpK5wYlvJEplbps8sRuuQ2hvWXcO4q8oGhOPSVjw0r4YUUnDWkvu/k0Vs5ED9GRt456dBEB1pP0iWqbDOa/tFXzeZCyjBi/1u6AtOxHjgtM9LPnm68LtAX5uhf7tu0sFCjk47X4pNo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2017 16:34:11.5827 (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: 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: 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 937209805baf..cb719345aa0d 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 */