From patchwork Thu Dec 28 20:33:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10135853 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 E119160318 for ; Thu, 28 Dec 2017 20:34:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D3F712B1F6 for ; Thu, 28 Dec 2017 20:34:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C8DC12B88E; Thu, 28 Dec 2017 20:34:05 +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 3C3F32B1F6 for ; Thu, 28 Dec 2017 20:34:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755160AbdL1UeD (ORCPT ); Thu, 28 Dec 2017 15:34:03 -0500 Received: from mail-cys01nam02on0043.outbound.protection.outlook.com ([104.47.37.43]:37924 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754413AbdL1UeA (ORCPT ); Thu, 28 Dec 2017 15:34:00 -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=G/m3W/ZxFjS09a5OWEYjz58z7Vqv4wHBNciVWcCrmzE=; b=ctUYxZu9PTCoMs+tExHNZyg70cPlj9toOQRG3wegIEc6I0TIKsX0qChdeXL4nDoFoEwZkx5ywLIWBy2GvZmQqnYyj5D03U2W/bmWtW+zczVOJTBPz/qaVqku/pblNkJ0sRk71WdeQKwjuWRT+mxLiQrZJmV2nLmRvPB1baQK8b8= Received: from BY2PR07CA0079.namprd07.prod.outlook.com (10.166.107.32) by BN3PR07MB2513.namprd07.prod.outlook.com (10.167.4.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Thu, 28 Dec 2017 20:33:58 +0000 Received: from BN1BFFO11FD008.protection.gbl (2a01:111:f400:7c10::1:165) by BY2PR07CA0079.outlook.office365.com (2a01:111:e400:7bff::32) 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:33:57 +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:36 +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 vBSKXljQ002832; 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 vBSKXlcA002829; Thu, 28 Dec 2017 12:33:47 -0800 From: Himanshu Madhani To: , CC: , Subject: [PATCH v2 09/37] qla2xxx: Enable ATIO interrupt handshake for ISP27XX Date: Thu, 28 Dec 2017 12:33:17 -0800 Message-ID: <20171228203345.2702-10-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)(376002)(396003)(39380400002)(39860400002)(346002)(2980300002)(448002)(199004)(189003)(16586007)(316002)(42186006)(85326001)(6666003)(106466001)(47776003)(50466002)(87636003)(81156014)(50226002)(478600001)(54906003)(81166006)(76176011)(110136005)(2950100002)(5660300001)(51416003)(72206003)(8676002)(1076002)(8936002)(356003)(86362001)(36756003)(4326008)(69596002)(80596001)(305945005)(2906002)(48376002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR07MB2513; 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:wHyxHPxkSE3d51nyz9lWLAFRtlviELsXBCCa4ypyXSZlf2EWrstAJxuFEUpAHLBto5Rx6FQXhcLHeKDoaWyJBUcjb4GUnVYNUkgjHYWb+iSwkIqUpRapvA7HxkH7odfV X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d76d5a1e-2148-4edf-52ad-08d54e3245ea X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060); SRVR:BN3PR07MB2513; X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2513; 3:9o8+ef40m/+kj4lVuzplU+buIP8Ey/fi74+pibUg+VS8iyIi+0XMj0+7rfMqcnD03jx8bnu3k0Jm1Yda+T5iP77XiKXbpo5SM3Fn2zUEm+rsBOnIHcYhIpguN37vqI9hYuUwr8bHmjX9K2HJSZU6O4h8agXgMMul4AT7Hh8suSJzrtsGf5nKhcdtFuBQ8dp1y05S9/NwRA+2wP3c4O/TSxxot5X8MnjQg+Y8Y3HFRRs7BENBOqU5fDRhXXs8u8MgcZsG5jiwQGeJ2fa7l6NR7peJwqEdRNC0GRYSAtJK8dNcU5RgdwYDtPgxSVfDN0kmTp2y/tbGokMxBJD8xQybfQ==; 25:0pW7ILZV1nfz5h96ORGTqTrZ7l2oeHkCNneXv5X94aoDYGvsnKikNeC03mYkzTFVYSqW/WDTOvYYcFEVl4XE570uhV8RV/sGpGx1XwD1nNEiAC2FUM+F0htSne1ZTFsO5t03cASkcZInHRkDCly5GFZVki0QyRwFWFDMUmU+uB2Acgc/NLcKsldqxDsosar4LVTlNqvWYYS2oGf8OqSb8+8pl+QKtNwVjhDvjgP8z5Xc1U2bTaPxs0+97eRB4f6qK/Nv3j5awddbmdclVYGxQzpi8Nz9szbSwZMTb0Fbt04O04VyZdSOoy4avEDBx8xcoKuSXjIE1L6+Pmgvr1Xgug==; 31:KuMtkePIRNGqoZhDaiI+DEdgD+GSaynlSli+Qa64updnk3+GR4VEmp1zZ/OHITgQkFDyHKLUse9yyIlisaG/PYcvwptEXN+JiIBnJZeBReEOTXPGdG2+dEmZRgG//GwNzZPOWwcTi4mezSYmgh171DZSDJNi1rO1/dx/rGqyzpqJfEjYhgnwaUYz8UY1a7UN4buOOwxKBJIADT83b0bqRIEzbAdUywm3X/xpj9NefRk= X-MS-TrafficTypeDiagnostic: BN3PR07MB2513: X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2513; 20:nYJpPaiaxyijNWdc8DG7Q0JbERj/PkLDtJRFesTkWqspmKh5FlCi/G6//N4hengdowGbf0abR4w4JuoiXqBEHA6/QLEOUwpNtaEFomN3QsxNZkjyUp5KgLfWjdTAqqwtJPsXzeMAHv6s+m25DYVS2HZalkJGZK/99c6x20XuZD5SjeFHTMENWekKfbBpkqT3t+1M2j1bFxmlgVwqiKG7jaPpYNpwol1Qsl/A971+1k6wWJBuEsDcu05Eu20ZourN9KgpQ/+20SjRgqrk9V15qTvJkAwt9Sh8UnCp2M2CHf6ugsI24mZpxBAixVQYsNmbZAf8pIn2NJMoMOqVQ8aHu8l9kPx70BZiBtknUXImbbI3DwUiYd0h319xHeX0xXIjNQRmLxbcXD3wl5TwQWRnBqMZPeOWiil3xfICiehWIURkR0jPBUSa5losA/BRtu2adlU7hxBCmB7jncvhm9q41KwAyGZsS1NQIyPU7zOTE358dKZzjIOOR2vKVOb7l+K3; 4:qTmqvxmi3T6PkAIMIu3z0+tFhPCIhf5NoCo5E0eL6PbvK4kVOFExGPfhcvVQ49M0b80Ck5oSiIH028Gjc8EqS9/kR5u3RWu9nnN3p1jpJyuj+2X/CO+WUxVmXv8aZvdgiH6+F/mWfXJLXOdvFOEhKJDl97g7e7dr5tHKLpe9z7R5rt/6zlO9t0x0Wbk8J49cgdkPstqJGY3kXwqxJWGobvbShKblFtOQnX3wqji5MrBBUc+UD9xsXbmYTjV8HbCML2UKq5fS4JnUKL5TflHiSg== 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)(3002001)(93006095)(93001095)(6041268)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(20161123562045)(20161123560045)(6072148)(201708071742011); SRVR:BN3PR07MB2513; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:BN3PR07MB2513; X-Forefront-PRVS: 05352A48BE X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR07MB2513; 23:Y2alduXIalkFndeF5S4Hy1mhHBicLdTtRafar8em7?= =?us-ascii?Q?a+SK1dUFFXdDnBEJvrRV+ADMFDNv3cWfFrDC4jxq9argethSJxOVDZRxGkKU?= =?us-ascii?Q?s/DUFRHZzRps8nY9JCa1/uYwKyMSgRxlpPd+aT5RAjlOmzZM/3fJVg2LauSR?= =?us-ascii?Q?eBvcILou1twpWiuK8B2NICiiK8r0t7Dm42WnBZuR9AThXdSOvJepUKmjSIMO?= =?us-ascii?Q?49luhCWZPII3Tt/iX+1nHclpPd6q1SVQoDjpDSwklL66ESarNuChut53zn5e?= =?us-ascii?Q?T1iXmllVQaZv5jGRL9RMBSthXLlefGNSNjLQ+s+kIwnrieVeziDz1wUNblbr?= =?us-ascii?Q?AZjmGO8uzxc0kyy8V282ndpSBPxw/9NnL58s4QQwpehFbGuFU1jzEH6mRQMo?= =?us-ascii?Q?qg5NPSeGbFP0kGXyIAugBYcNgbvjJrP+8OlrdoaaZDIgmd9HqPavmnvIIQab?= =?us-ascii?Q?4OkUzKEAsll5kxB3Ka+uA4Gjv0sgfz5Qv+5tczm8PTPDAw3qMi71jOhD15PI?= =?us-ascii?Q?L/xvkWMhtOTZDf18ntscZHiZ8KW9otyHQ6UPwoJuPOX+QnWATCDSgdYZOrR5?= =?us-ascii?Q?wQwTACez9kBYiCCZSyG5cFd0ruRyqT/WEechfWRzS25gX/hBGtfKZ1GJJhvv?= =?us-ascii?Q?gR5RdC3yrasHKCkgwksF9nvgjqVi1LnUm9IwKuQg2nXWhKKsSHi/r6gjsDpv?= =?us-ascii?Q?DE2E5siOuE+ho8tzQcz4PYtEn/46rYEK1xhjl1MyL2EoUU6W+8Ax/whT/sB9?= =?us-ascii?Q?Ti3352gz89UPpTR21labef/oo751pQGLvi9uNRoRW5IKkyWaTZ5sBZlBvfKw?= =?us-ascii?Q?KZbikrKvg+L14IeWnrtE0cgRNo2DwGAMw14loMQ/Lnyy3QYG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3WTUFs6nsc8dM0CUodDHCSn8xtF9pZCvGUZexFEC+IhWHii0FCQ6Q3S SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Dec 2017 20:33:36.7521 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d76d5a1e-2148-4edf-52ad-08d54e3245ea 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: BN3PR07MB2513 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 067bcc57a9ad..db6fd3b747ed 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -6574,7 +6574,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; @@ -6582,19 +6584,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__); + } } }