From patchwork Wed Dec 20 06:56:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10125067 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 4C0106019C for ; Wed, 20 Dec 2017 06:57:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 42F7029649 for ; Wed, 20 Dec 2017 06:57:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 37D182964F; Wed, 20 Dec 2017 06:57:20 +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 B631B29649 for ; Wed, 20 Dec 2017 06:57:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932471AbdLTG5S (ORCPT ); Wed, 20 Dec 2017 01:57:18 -0500 Received: from mail-dm3nam03on0064.outbound.protection.outlook.com ([104.47.41.64]:37047 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932393AbdLTG5H (ORCPT ); Wed, 20 Dec 2017 01:57:07 -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=C3ER1k+MbaEDp8r7kC4TUTeHhNaCbGwbAeV6G895SRU=; b=JnzmaAK5TWEhnr4mI4FR8EPm9uUhjXdhSg0gWH0EsgbCwqlYWRkrQ/L/rsy8WtiSweQ5pxmcQauicT0+qOMtS7hwKVy1O8bcJq8wkpjWu0LihYsMVGnsk404HiVNi54QjBCWOtxqaWdjQlg4TAehEOCateAGMb7PVeKzOncicWA= Received: from CO2PR07CA0077.namprd07.prod.outlook.com (2603:10b6:100::45) by MWHPR0701MB3819.namprd07.prod.outlook.com (2603:10b6:301:7f::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.323.15; Wed, 20 Dec 2017 06:57:06 +0000 Received: from BN1AFFO11FD043.protection.gbl (2a01:111:f400:7c10::154) by CO2PR07CA0077.outlook.office365.com (2603:10b6:100::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.345.14 via Frontend Transport; Wed, 20 Dec 2017 06:57:06 +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 BN1AFFO11FD043.mail.protection.outlook.com (10.58.52.190) 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:52 +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 vBK6ulmv021594; Tue, 19 Dec 2017 22:56:47 -0800 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id vBK6ult4021593; Tue, 19 Dec 2017 22:56:47 -0800 From: Himanshu Madhani To: , CC: , Subject: [PATCH 12/43] qla2xxx: Enable ATIO interrupt handshake for ISP27XX Date: Tue, 19 Dec 2017 22:56:13 -0800 Message-ID: <20171220065644.21511-13-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)(39380400002)(396003)(39860400002)(376002)(2980300002)(448002)(189003)(199004)(47776003)(5660300001)(8936002)(478600001)(4326008)(72206003)(106466001)(87636003)(50226002)(356003)(81156014)(8676002)(81166006)(69596002)(51416003)(80596001)(305945005)(76176011)(48376002)(1076002)(2906002)(316002)(54906003)(110136005)(42186006)(36756003)(16586007)(2950100002)(6666003)(50466002)(86362001)(85326001); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR0701MB3819; H:CAEXCH02.caveonetworks.com; FPR:; SPF:PermError; PTR:50-232-66-26-static.hfc.comcastbusiness.net; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD043; 1:pwV4W3OYLhJ7s0SGCSOj0uC8vGbARPGy5K0M1nVWXSOHU6LfqMVMsU9w2Zp+hO6Y7/XkUpVkbOG9WtERMZl/zzjqjWlR6TQakWIzfO5ypUiwP70pEmJnlCtTcehss5D/ X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f0d8e758-33b1-457b-8d6a-08d54776da0b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060); SRVR:MWHPR0701MB3819; X-Microsoft-Exchange-Diagnostics: 1; MWHPR0701MB3819; 3:nSgo5GgfE7pb8/iEKbVLeMBQaUCJu11Pdtp0Jyh9/PZ/Xf5jbW+G+ZycAF2HZlwN+NVNdX4fXyeRvyHt0yR6+EggZ0LBd6PtELWY8CfSZgAkDlVD2+FSHMfZKgt0PPm3MmVvfy/WLZUCkZbA7SDAhU/4osrSJET/NLI5kTaLeyeLwL2vdHw+nouMBwLTB7f8F69jZkYi6u7vTYDO19seygFg/1p4BBp1rgryWoR08JGZc3g/Xml55WAN9ubtK7N6BItHDfWTAa4Jue38YqiBXR+NuL+GR8lp1eRGHmYPuffoXdujvusuUs/YPgF1TnbcQtI6AkSGe21K2/UhcAerUp4FZLdk1qwZK0yOB+VJ4P4=; 25:1Uis6nZLA0knfa8gqmkRlH1iXbiWtCpgamai409im5+QmK5KpqmKw8UE5kYQIWloOntjJmKRWpK8bajKQZCYpG/wrmaPBHN9aaSaL5JtehDyhWuxEWf2bpqM5nw6QrWnS6KcujVJlpWTVPuIMhJC90VORzqSmS1GYF9japQ2Kl65Lp9ZoNxBe4tcCqT/42nZiw112BPXJY1q4WBasEkQINVxQYCz5LGAQHYPAyEp0ZxsWQUuSWG12cF/+TpGkL8ja3qY3NVDje1+E32LbAyY1mQlJq07q4o+Zf3LUF8ZI3j3SkS65X3UUpzARhpEs1N9Y4tjb7IRLUoBW4fzrgs86Q== X-MS-TrafficTypeDiagnostic: MWHPR0701MB3819: X-Microsoft-Exchange-Diagnostics: 1; MWHPR0701MB3819; 31:7fPicR8+OM702VLFtyWJtVA4bC0pjFr4evHr6rCZzP/PKqG6ywkQzNqOZid7ff1qIcjpoSsmedABQsHqQDPM3WZxtPzotKOKYlSRl2CJxo2T+GvO5eMUjKsHM0i8uC9+Lb/+bAaBvi49wpHxdcaDoAPLuOuJs41VxKtDEoujOzW86Dvz8qlCupH11EwO+zkNWiDQWV89ZzVwRIkQDTI/n1Tmo6i7ENzAzMNbssb8Nyw=; 20:39NGQY+B8ennzXMmUCuUup9mVT+1KPuSicAgJY3Z+Qsv2yNseHoeUoAuH4NZntBenPzuZ3rtRmtrnVyDQFdkZTkME85/OD2dyzZCu+7BXYYWdcM2xnc34HZlArUfGH0F3i9+r7W1Mg6159jmeyMBc1ENXlctvUP05GLTjvBg14y8PtbxfYOlQbZ9vuxrCl7VS5MOeJbCxu5Yy1xAZfrONtyiQPtIxY+pBDZlpqgHAaOeO8kua6D7R3uruRb52jK1SMc40P2bH0l0G0iJ2VZCygPKZOOIhEYgW+RJPwM+HiXjVMiCho+3sjxW0nonbnB2KMYqTuQZdgHKSQ1obsnw34eZ4xRJRRyzbWIhLgJ9ZfNK4180L0Jcnx5k6+xRzI4SowYgYWy/7s6eGxrfwwkNJfeBnW3lfbqiJuJfVWj1MUDFS3Sij30VJTHejwHxgBFdzIvt1BKAWtYcP17modnClknPYrUSe3OINIFqMYB2Ix4Avvy/ZWE7EqhyRmnaYOqU 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)(3231023)(93006095)(93001095)(10201501046)(3002001)(6041268)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:MWHPR0701MB3819; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:MWHPR0701MB3819; X-Microsoft-Exchange-Diagnostics: 1; MWHPR0701MB3819; 4:YXmUZkWUumkqdpKUPuTL5kRz8HOqmYP8FFoxp5frPpASSB5IOi+SwUt/dE4IIyBsHPnqdt5Jm3BPENaKww9kZBhdmjB1JGkFDLIxE8ohzy7e8msbX/+7wNcbfV6rM7VmT3OV/Slka1kGAdeqZDN1ZxwMXghXLb96Yu3F0ziZmjOgmteUL3iv8ElgfzMOssOmSNtkNR38YkVcyrLENfWihNklGTWjeJ3ymq5deUeARDVvIMRNOnB5hI7ysOg7DZm1a9Iqk4oJHl8HDFqwJduXnA== X-Forefront-PRVS: 0527DFA348 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR0701MB3819; 23:BWONHpda80wae4Sokd1vRCBPCDTrvyFiokl2HOV?= =?us-ascii?Q?yZ/gKhZp4K+b+OZJs2PjbwbcCvMtfzeIphQphi4dHn3Yd8Wn+lxb/mnzqAV3?= =?us-ascii?Q?etvLsy4R1f5EitquD7n4edwQqsQuVa65BcCyIaivOl3P3sSmAQ9ykXbhy47R?= =?us-ascii?Q?cYo3NKzmE8t3KXpOcNYtnG7tqBP/0pu5IZp8AwpCaDq6JYwMT+VKY5ZOEgkx?= =?us-ascii?Q?M4FkpkVR6476DTGwYPjw7dnt1UyqE1am97M9g2w0VZkjXqa5hutkeDoDipci?= =?us-ascii?Q?x1eMMfMpfiONjraXabmr0auQH/ICNZ4yfH8htXPt4NrolSF/b+Qm05fRd/Q7?= =?us-ascii?Q?cPWGmm3quXiQD2Qi6ieOcvLnIo2Vbldnr2WtS+Z9/ru3badjACxACubHVPjB?= =?us-ascii?Q?yMm7TJJC+WogZAj6jGdcqy96cslg0SoRv3rjIhpnIg7JiNFQmTb6ZsUSvUpM?= =?us-ascii?Q?nVSA8QZ9WRCOhfyeUJVnvyp4aN1FnSghr+kW5fn/asox4+eq/mpF83BixGUB?= =?us-ascii?Q?bxJztqyjqCEW3V2vZ26DdPGtZc2QrehHck638m1TjKhfLnbrYnDsyD3qd1gV?= =?us-ascii?Q?o4zKU3BnH87RegZvyQtYfQXMHcqqFnN4xKjuBeH7wh80DnGBr4SIvhTFTp2I?= =?us-ascii?Q?O5oDS44Fh8n540XK5yc5TKuZ6igjXOVbddDyEGtsRC36sa99uJNWwqTrjri/?= =?us-ascii?Q?BfIHStl5jZXCrWeIuipouPeOAvUuRb+H4onxXS19z4Bl8sTwox5+ZA326Ld7?= =?us-ascii?Q?7irroO1uvFZemveJjNCIxHcNctah/8SIkfJG3eH+fbvFq2eW05ic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wf+/a1ZP5ztkaCM1cCdcWkCXYVqkfckpn5ldjsc1xddSDaM6JytYE00qd8eW/wn3qW+/DTs4D+8LMAV7aeMcMIeJrKXOOzjO8U6I73mueO5LCfVy7eVw4kcl8NXRhdZg3Nc6/ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Dec 2017 06:56:52.9264 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f0d8e758-33b1-457b-8d6a-08d54776da0b 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: MWHPR0701MB3819 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 Enable ATIO Q interrupt handshake for ISP27XX. This patch coalesce ATIO's interrupts for Quad port ISP27XX adapter. Interrupt coalesce allows performance to scale for this specific case. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_target.c | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index 0d77b2f67077..835721f077f6 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -6598,7 +6598,9 @@ void qlt_24xx_config_rings(struct scsi_qla_host *vha) { struct qla_hw_data *ha = vha->hw; - struct init_cb_24xx *icb; + struct qla_msix_entry *msix = &ha->msix_entries[2]; + struct init_cb_24xx *icb = (struct init_cb_24xx *)ha->init_cb; + if (!QLA_TGT_MODE_ENABLED()) return; @@ -6606,19 +6608,28 @@ qlt_24xx_config_rings(struct scsi_qla_host *vha) WRT_REG_DWORD(ISP_ATIO_Q_OUT(vha), 0); RD_REG_DWORD(ISP_ATIO_Q_OUT(vha)); - icb = (struct init_cb_24xx *)ha->init_cb; - - if ((ql2xenablemsix != 0) && IS_ATIO_MSIX_CAPABLE(ha)) { - struct qla_msix_entry *msix = &ha->msix_entries[2]; - - icb->msix_atio = cpu_to_le16(msix->entry); - ql_dbg(ql_dbg_init, vha, 0xf072, - "Registering ICB vector 0x%x for atio que.\n", - msix->entry); - } else if (ql2xenablemsix == 0) { - icb->firmware_options_2 |= cpu_to_le32(BIT_26); - ql_dbg(ql_dbg_init, vha, 0xf07f, - "Registering INTx vector for ATIO.\n"); + if (ha->flags.msix_enabled) { + if (IS_QLA83XX(ha) || IS_QLA27XX(ha)) { + if (IS_QLA2071(ha)) { + /* 4 ports Baker: Enable Interrupt Handshake */ + icb->msix_atio = 0; + icb->firmware_options_2 |= BIT_26; + } else { + icb->msix_atio = cpu_to_le16(msix->entry); + icb->firmware_options_2 &= ~BIT_26; + } + ql_dbg(ql_dbg_init, vha, 0xf072, + "Registering ICB vector 0x%x for atio que.\n", + msix->entry); + } + } else { + /* INTx|MSI */ + if (IS_QLA83XX(ha) || IS_QLA27XX(ha)) { + icb->msix_atio = 0; + icb->firmware_options_2 |= BIT_26; + ql_dbg(ql_dbg_init, vha, 0xf072, + "%s: Use INTx for ATIOQ.\n", __func__); + } } }