From patchwork Thu Nov 30 03:40:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10084205 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 D22FC602B9 for ; Thu, 30 Nov 2017 03:41:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C93D529935 for ; Thu, 30 Nov 2017 03:41:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BE2C529B02; Thu, 30 Nov 2017 03:41:32 +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 48E0229935 for ; Thu, 30 Nov 2017 03:41:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753272AbdK3Dla (ORCPT ); Wed, 29 Nov 2017 22:41:30 -0500 Received: from mail-by2nam01on0042.outbound.protection.outlook.com ([104.47.34.42]:11808 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753275AbdK3DlT (ORCPT ); Wed, 29 Nov 2017 22:41:19 -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=J+2F419tWn60h0njqqlAJI5ZqY5hrhPmAh+IEUYj+KE=; b=A4SoBT+pBuXn1MYIuRy0A3toPWBNp52p7+kcWycwzRlI9/bu2bTwrCPI0OYxRDlk4lcCoXn5VIiG06dqolerhglkRZsh6m/eTtw/n2ahHoCNbFYvK/gwnxG1Qt6MyhLo4XSKc3ndElu9F/3LiEKr0Fd6ftPgGn1hES4ty/elVGY= Received: from SN4PR0701CA0013.namprd07.prod.outlook.com (10.161.192.151) by CO2PR07MB2520.namprd07.prod.outlook.com (10.166.201.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.260.4; Thu, 30 Nov 2017 03:41:17 +0000 Received: from BL2FFO11FD056.protection.gbl (2a01:111:f400:7c09::109) by SN4PR0701CA0013.outlook.office365.com (2603:10b6:803:28::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.282.5 via Frontend Transport; Thu, 30 Nov 2017 03:41:17 +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 BL2FFO11FD056.mail.protection.outlook.com (10.173.161.184) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.218.12 via Frontend Transport; Thu, 30 Nov 2017 03:41:17 +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, 29 Nov 2017 19:40:51 -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 vAU3ep8e015178; Wed, 29 Nov 2017 19:40:51 -0800 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id vAU3epsX015177; Wed, 29 Nov 2017 19:40:51 -0800 From: Himanshu Madhani To: , CC: , Subject: [PATCH v2 18/22] qla2xxx: Defer processing of GS IOCB calls Date: Wed, 29 Nov 2017 19:40:43 -0800 Message-ID: <20171130034047.15070-19-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20171130034047.15070-1-himanshu.madhani@cavium.com> References: <20171130034047.15070-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)(33646002)(105586002)(51416003)(8936002)(1076002)(5660300001)(69596002)(2950100002)(80596001)(81156014)(81166006)(50986010)(76176010)(6666003)(106466001)(2906002)(305945005)(356003)(8676002)(50226002)(47776003)(50466002)(48376002)(36756003)(72206003)(86362001)(101416001)(478600001)(87636003)(189998001)(16586007)(110136005)(4326008)(54906003)(42186006)(316002); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR07MB2520; 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; BL2FFO11FD056; 1:GVkyV9seVHlmsIk7VI8zA8ezwfaOuMMvKzj23ne5PDsnGvYZrMqX5tA+tusYChapQLAS46HkknZEcb64hICtV9F7ZJZeikYJgVApGwNqiXVEaaB0qU6oC3W/ihQr5Gbb X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8ebe52b0-dbf2-4460-687f-08d537a436b6 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603280); SRVR:CO2PR07MB2520; X-Microsoft-Exchange-Diagnostics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JDfJ1saxUcWIjZpOD82iWRLzrn1yBEL2GB1syPt8eN5mWUxUUbgRM4UgzHrfA84UXZ/VUo86j1TtJTMZw76JNKQEB5qy3ZFrQZL1TwUtoKa1ax4iRegNVsV15qFoLiV8w316ZGDbrnolYACF0dpGUHJyEgJYPAXyAF/oFPe0xuOGHDJRZk0qOjij9paKpl31mkryuqBcU0xgXYNtnc5fATNgWZzXljafhX6lxvfUiS6LhTZOH7mwLOzZ4oaOpzCSm7bdELriwNaedhvqReLSMqTADl6TDwvQ91KVyhKq5Gt72maw4x+GOzQrzxakAb781ySYylyz6hk06GQtcSw07z92Jcga1w+xxnVGSgsMBt2ZTUncoC0exg1Fl74bCY0N6UW2OtHR9ow83iyTlipGcb1nkknVsu0Cw9IeFV+EmzhcXxNVqUrKmHujiq4Gfk4D+AcpPidRC7L5+8du X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(9452136761055); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(3231022)(6041248)(20161123558100)(20161123560025)(20161123555025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(6072148)(201708071742011); SRVR:CO2PR07MB2520; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CO2PR07MB2520; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2520; 4:p2mCoi8PCxzbOCG01+oz2QhTkIE/8CqWNsx//jLDwJBl/J/xUcuaNR4UIZuJHCSIcg3IMCMCFRfnni18c6WAuLO8drMbfhYXRTBRwOkX37aqxYItu0Oxr98tb0IUQRwayeRbQ/84z1khWgZw4o3XPBWi8CYxdK6OGNvogeL+8axGQx8CCffn2SmvP5uD10cYtb0NqYQzsgh5YT7CDQzutGC2APyIFm5p9bJUIDC5b+qeblJRVE85kEtyOqtZCMZGYeCY4Wt4WdCXegC3a4tXgfuOc30T+Me6c6LY+R8ig3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S7FUY8HyMO3IhxkrWuBruPFe8pgNLysy3xEFbeN89ER5UfStOJfQAFRiWwWSnp8YAvNw5cZKhBSLdtBWTwjqKQKyFQy6pJ/DfMpmIMNaRfTPLBOy72cr7PchtiXZzYvDftFGH7q72uYHFtRa9x SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2017 03:41:17.1449 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8ebe52b0-dbf2-4460-687f-08d537a436b6 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: CO2PR07MB2520 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: Giridhar Malavali This patch defers processing of GS IOCB calls from interrupt context to avoid hardware spinlock recursion. Following stack trace is seen ? mod_timer+0x193/0x330 ? ql_dbg+0xa7/0xf0 [qla2xxx] _raw_spin_lock_irqsave+0x31/0x40 qla2x00_start_sp+0x3b/0x250 [qla2xxx] qla24xx_async_gnl+0x1d3/0x240 [qla2xxx] qla24xx_fcport_handle_login+0x285/0x290 [qla2xxx] ? vprintk_func+0x20/0x50 Fixes: 726b85487067d ("qla2xxx: Add framework for async fabric discovery") Cc: # 4.10+ Signed-off-by: Giridhar Malavali Signed-off-by: Himanshu Madhani Reviewed-by: Hannes Reinecke --- drivers/scsi/qla2xxx/qla_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 7dd19785f820..57b8f43c5980 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -975,7 +975,7 @@ int qla24xx_fcport_handle_login(struct scsi_qla_host *vha, fc_port_t *fcport) ql_dbg(ql_dbg_disc, vha, 0x20bd, "%s %d %8phC post gnl\n", __func__, __LINE__, fcport->port_name); - qla24xx_async_gnl(vha, fcport); + qla24xx_post_gnl_work(vha, fcport); } else { ql_dbg(ql_dbg_disc, vha, 0x20bf, "%s %d %8phC post login\n", @@ -1143,7 +1143,7 @@ void qla24xx_handle_relogin_event(scsi_qla_host_t *vha, ql_dbg(ql_dbg_disc, vha, 0x20e9, "%s %d %8phC post gidpn\n", __func__, __LINE__, fcport->port_name); - qla24xx_async_gidpn(vha, fcport); + qla24xx_post_gidpn_work(vha, fcport); return; }