From patchwork Tue Nov 28 19:34:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10080961 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 93A45602DC for ; Tue, 28 Nov 2017 19:35:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 86D5F29626 for ; Tue, 28 Nov 2017 19:35:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B12B29651; Tue, 28 Nov 2017 19:35:47 +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 189182963E for ; Tue, 28 Nov 2017 19:35:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932181AbdK1Tfn (ORCPT ); Tue, 28 Nov 2017 14:35:43 -0500 Received: from mail-sn1nam01on0046.outbound.protection.outlook.com ([104.47.32.46]:25512 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932167AbdK1Tff (ORCPT ); Tue, 28 Nov 2017 14:35:35 -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=WQcExMd4JvIKtid6GEoKK2xb2xoaGrD9Z7w+Kz/yWSWBwYNqP+Yo0OouOivnykUPhC3ee1TNpRrB7ifCY9mROyDUsp8R5e5UN861sZXotaU3Fu7emcY9lM1tWar50/nasjWAUOv406NzQO7Kqg4c2/wtvOzwUN0rnXI8JyPOZEQ= Received: from BY2PR07CA0098.namprd07.prod.outlook.com (10.166.107.51) by BY2PR0701MB1944.namprd07.prod.outlook.com (10.163.155.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.260.4; Tue, 28 Nov 2017 19:35:31 +0000 Received: from BY2FFO11OLC011.protection.gbl (2a01:111:f400:7c0c::127) by BY2PR07CA0098.outlook.office365.com (2a01:111:e400:7bff::51) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.260.4 via Frontend Transport; Tue, 28 Nov 2017 19:35:31 +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 BY2FFO11OLC011.mail.protection.outlook.com (10.1.15.22) 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; Tue, 28 Nov 2017 19:35:30 +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, 28 Nov 2017 11:35:07 -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 vASJZ7sp013802; Tue, 28 Nov 2017 11:35:07 -0800 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id vASJZ7Ix013801; Tue, 28 Nov 2017 11:35:07 -0800 From: Himanshu Madhani To: , CC: , Subject: [PATCH 18/22] qla2xxx: Defer processing of GS IOCB calls Date: Tue, 28 Nov 2017 11:34:59 -0800 Message-ID: <20171128193503.13695-19-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20171128193503.13695-1-himanshu.madhani@cavium.com> References: <20171128193503.13695-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)(54906003)(81156014)(189998001)(8676002)(110136005)(16586007)(81166006)(105586002)(101416001)(106466001)(305945005)(356003)(47776003)(5660300001)(33646002)(1076002)(6666003)(2906002)(51416003)(69596002)(48376002)(50466002)(42186006)(50986999)(76176999)(316002)(2950100002)(72206003)(36756003)(87636003)(80596001)(478600001)(4326008)(8936002)(86362001)(50226002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0701MB1944; 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; BY2FFO11OLC011; 1:icQ2SER0Ilkp+RobXDHsz6yNCIrBZkmNLbjV+YgRnrQv2kyyNe/Na5hQbe+Qh7pnKu6OPE7YOtRAwSYF9CLCS1+aWE2ZAgjqm2RpsTeg3b0u/qgXNiw8XnGvEcW9tMcD X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2f9b62e2-e0ca-45c6-a51f-08d536972fa1 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603199); SRVR:BY2PR0701MB1944; X-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cZB3xuV/9KuPmteWogYm90A+ZAwhNzDA8wEm8gNouh0W59BO0gxXRgP/t3XcEljQLO5N/UCJdPR6dAGfl5mj9rEnbGWUQz5bdEDO84leX67u7n4RAi+bVhKClfoiyYrEQ4VUE6wGM0uzvRGAXFrLnwLOUeA1knSpz/AszEsmCCFIpQl791iWxgNTznvbbaS3RTLUGySxND/hme9Fdcq8ZwJxG2lEZ0fum14gKkmTDNtt0t07ZH7UhGbhthMU/uFOiQuDZ5AAXGp/NxXgPP/PetSdFR4i8NO1uY+bMst+4BrgMVOl7d6Cly8bh6p9SOGvynkjRyxyYIMhArea/JS3hx4i7jjrb503UyPc9fx1+RYutQMoQyVYCGi/VYaJeCNTxFmeoDvq2omZT+rAx1hOHU1uW11aBAmzjMKtZAOPb6Wl55dhiPIWxOIsqk5xzbJMD/mPAK18q8WolBHUN0NecTWvKT9Ek/n0cO7LQObPm9PafTs7VudGovn 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)(3231022)(3002001)(6041248)(20161123562025)(20161123558100)(20161123560025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(6072148)(201708071742011); SRVR:BY2PR0701MB1944; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:BY2PR0701MB1944; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0701MB1944; 4:FFFXghAQAbE//lwYe/8WA3smJIr7YZSffY2DmrdaTZ6GcZ6/69HMPNhYSpnlb9dAkblYrmWPCnO0UXSJufPOma3RtCr3rICcv1Uo0LR2dorr+3M5KtBDnp5xgQj9WS8OJZCNQ4n51AYl9P+fwRc4NqXXTDyolM+O4YWqiERQs/x5syybl3tT6EcMfz7rwRkValV0GfLFpgSuILLGkGpMK+Kg4F9Gn+J5dnBHgYrgyNqMGxEO4oe6QDy5mN70XYxD2A8KLNYKTQ8w0VaeP9HaP6aNRKTWz8GR7NY+3ZOuw2lbz1nbOIzMit+Lza8BPQ98 X-Forefront-PRVS: 0505147DDB X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR0701MB1944; 23:sE8l0q6ydc7doV20FKecnwC0zq7DFQyHzc5gt2d?= =?us-ascii?Q?UTewbS+/u09DW3ASRucf+F/zTfHSCe89wexGMVeSWPCl6QDrJoGhcYm9AjP4?= =?us-ascii?Q?medc5dCxpoW+8dJAoKMQEkrEvz9k8DXv7giYPwIUGjQmVOug6W77NHShpu8H?= =?us-ascii?Q?V77qztWDgqgC8T8/IP08X59eNtUlzfvCIoUgioOj09aMzAG6a/kuk2fMF98U?= =?us-ascii?Q?m42p6+UZKnTRaSXi4g9yTDOgZ2PMHmGjj5by/ubDqSJLLwnaxqtJCFvUTMN1?= =?us-ascii?Q?xl9BJBCCQuBdkOS5cHopRG1UFyLKAo8AvPSApz8vB5iRJbsUJj1IZrkEj11d?= =?us-ascii?Q?H5LM0hNtyquKIjw8WyCUiEq2zC7Th3TntWVBRJ8PG5XkbkzB54DoBuI0AAkl?= =?us-ascii?Q?2G2w7pZvHkF/Dx3yaSmZawyd+/1kntN3Bwazwp6+B/EXKAPDkWGuZHTlLb3M?= =?us-ascii?Q?CSVUfB8FxlO2u89f49NLPHGsGu4zSE1EsIKC1pzqU1QTf+3ZsBExu/mSJ9fB?= =?us-ascii?Q?hXBCE3IzlguttnCJ4MMQIGJx0va6OekQ8CnMHM6/Uf2V9MK4z4z2tiHuvGMN?= =?us-ascii?Q?gMC95jbijS7ubeL0T5wIqvq71WtmvEBxjNdizstc4Ziw9ras3HPrx4lYGF/1?= =?us-ascii?Q?8/QiIvmrQU0utCDGGTgyAShXOQVRf1LlFq45qmqdYHDoddp1E+kXZm+glx2H?= =?us-ascii?Q?RhVgpmS9DWhSF5ZV4Z2Uf/9zzsueuAbLhlWWM7fsNxmgebuFKEU9Xt/w2f0k?= =?us-asc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6FIkAnDlNsi9w9ze8UuE2leo7c3ijTo5LcnOv8cabp7lZ7rJ/TsTHvpJzy6E5Mq8daMst3a9LljQy4+0P4vL2bDz/rGOHQCeQNxucFXsVA78FhPrWM0LoXBh8fTMXM2PwmrKbZTfMTJKELJPP0BHAPsKdCmExUtk2rG0/YcgbKvXuuNpHKEKc1nhimtLrd87KCu7u2+YIsrZeEZcOYDTP5 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Nov 2017 19:35:30.7693 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2f9b62e2-e0ca-45c6-a51f-08d536972fa1 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: BY2PR0701MB1944 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 --- 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; }