From patchwork Mon Dec 4 22:45: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: 10091723 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 48FE7600C5 for ; Mon, 4 Dec 2017 22:46:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3AEBB29387 for ; Mon, 4 Dec 2017 22:46:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2FA7E29446; Mon, 4 Dec 2017 22:46:15 +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 8A2FC29387 for ; Mon, 4 Dec 2017 22:46:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752414AbdLDWqM (ORCPT ); Mon, 4 Dec 2017 17:46:12 -0500 Received: from mail-by2nam03on0088.outbound.protection.outlook.com ([104.47.42.88]:37712 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752422AbdLDWp4 (ORCPT ); Mon, 4 Dec 2017 17:45:56 -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=h4xy3RVjYJVZ4OMhQYxe+7aXpIsD8eMipLGAZ+/RuaQ=; b=Y4H08A0XHKhokhk8CzsnSQHree247tvHVOpNakqVkHQ59Gl20gOXg1wWqxWAs0p8ZI4J5knEmQQqZW3W/zO0E2i1zY7tZI24U1R0Pi0FnYtK//xmcT2754kbXZPKnAsI54oYQRsg4aKKWNirUJA73ufyUJBtL7xsmUsmjLGrgA8= Received: from CO2PR07CA0059.namprd07.prod.outlook.com (2603:10b6:100::27) by DM5PR0701MB3813.namprd07.prod.outlook.com (2603:10b6:4:7f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.282.5; Mon, 4 Dec 2017 22:45:53 +0000 Received: from BL2FFO11FD054.protection.gbl (2a01:111:f400:7c09::161) by CO2PR07CA0059.outlook.office365.com (2603:10b6:100::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.282.5 via Frontend Transport; Mon, 4 Dec 2017 22:45:53 +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 BL2FFO11FD054.mail.protection.outlook.com (10.173.161.182) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.239.4 via Frontend Transport; Mon, 4 Dec 2017 22:45: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; Mon, 4 Dec 2017 14:45:21 -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 vB4MjLdh003517; Mon, 4 Dec 2017 14:45:21 -0800 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id vB4MjL9A003516; Mon, 4 Dec 2017 14:45:21 -0800 From: Himanshu Madhani To: , CC: , Subject: [PATCH v3 18/22] qla2xxx: Defer processing of GS IOCB calls Date: Mon, 4 Dec 2017 14:45:13 -0800 Message-ID: <20171204224517.3409-19-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20171204224517.3409-1-himanshu.madhani@cavium.com> References: <20171204224517.3409-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)(101416001)(8936002)(105586002)(189998001)(50226002)(80596001)(2950100002)(69596002)(50466002)(33646002)(1076002)(86362001)(54906003)(106466001)(110136005)(48376002)(6666003)(36756003)(76176011)(2906002)(4326008)(305945005)(356003)(5660300001)(8676002)(81156014)(81166006)(47776003)(51416003)(87636003)(316002)(42186006)(16586007)(72206003)(478600001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR0701MB3813; 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; BL2FFO11FD054; 1:JYMNAa5A95u5aVABkXwQzpAtoISnr2usBlD+iUNK8T6tcewjVjo979ZuaHRO9BHamBGv+O/NI+6TTL4fIe5Z9e+YIUe/1tJRokVL4FL3f6e86h7CEe1VqlLnIchTM6n7 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5d17b91e-81cd-43d2-f3ab-08d53b68c649 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603286); SRVR:DM5PR0701MB3813; X-Microsoft-Exchange-Diagnostics: 1; DM5PR0701MB3813; 3:3GnmROQU8G3xLiT5a1ji5HkhoZjwLQdLhBLn5YP8+HH6My0dAgwrghEvfMjGONtQOShCmeTWtWCmhWVU8m8XkQq7VC4t7hLFH5OR27pJ7i/NkqP4lv6XzOdN+6Lw4QBUpZM6AdIFK+k4w0ozhHj50jkdXUdl5AuJ8/YQEflbmyEAAvV/uehLIV9swHWINemdBYyXnZujkKf8ePvZjYP515PWcHSqAUUPEyGrw8nKU/5UYiysbQBtpHcfH1d2LECEj6oaCinLGhgDkYhh/fDX8kOkJSZstMgWTKwDgN4lM7hzKrtSf8jsa06937dlwnVqpte7/TkpuOBDcC4QEb2EZ3syEEKj3vFGKZOyNCnLp3Y=; 25:l81z18BcR/BeL+5h22odd2tWx9Z5ufZCVrsit/dcVLIGXG/Wtgza8s2y2VXxw8db71/h5x9nHzTkP+CJSCwM4iYtD16O6jx3MCd2FCPDhtbEvoolX70D52jxjJc1K6RsDVFJ41YBiv9PvJKAnfgVlaY+dkY6Xkk1CWYBCd9QVBn41ZWhHjy8GYCjI7xzGl48QJg7M6EWv1v3WZjTguWBRkWFPedSaxXn/bWouMppIBvmj19BNjHIqi/cRpytMEaSLIYrDlLuTazSAPDJG/et6nd1w9U4d/dLgy4mzHOa+N9xud4QwIKQFeQbaGjK8ecORCcZGzayARui6yZUip7RAA== X-MS-TrafficTypeDiagnostic: DM5PR0701MB3813: X-Microsoft-Exchange-Diagnostics: 1; DM5PR0701MB3813; 31:MkjNXiwh0dnu+EY+5GrOaCbA1byffoBeZj9YahXbb0d5HvpUi3YTR1f9g0QmJcHdeEHLXVrNioGat0bbTw3LcPrXC1uecqgJ4NkASAuZWtrxOM2nNVZeve/OUU1GBRU13o4pFW4Cbq7kDBN1jbtXymRcOEQib1DneKJ8oeYgbm+zHjNWBi6gS1Kn01T7ortJ42Ydzc5H3H4i4oY8uNp6pb88nzh5mz6saQAugA1ENrQ=; 20:awF/gS4JzRFTCSozlyURzqTCS5oyxqkkuLrMSB2XOtbix3FMMhoPTnUD9JxhXBTpCKp/S8obY3kjfvbp9mfQ4knh2sOZVxRh3ohKFYtreZXBgetdgW2ra9EFJEBAawtZwB2LdCIZHB2zT5K1gyexcmqzK2VgnUujJqPM/haUQGVUlkUNM7E6BgNwfyAq3e2Sui2DJbs2V0NW48ULkKWIaA30YA3t4sv2nJHKbqBLFSCUfxFAcfZow0c+q6jLXGlL2Q/1zxhwirqqHQJX8k0AeEKmnFfxTOf4uK2iQ7MU2kt7imeLxBjrGauxMjd0ITBOxz0imFeuYrjpBlpf1VVrveYsz8ePiIjwkRD79ToiKon0EGNxRKZHor7oGp63oWpUVUMOM1awWm0j0zB4tXYGkedHkaf/PU9oNBw0QobbRdGNWyuhNGPsQi0VdFEth3AXywCjjz0FiMdRJxnrl0iW14QfreMIOmkg7P8Sok+W27YBKar2Yl+7A/dKRVZahA/Q X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(9452136761055); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(8121501046)(5005006)(10201501046)(3231022)(3002001)(93006095)(93001095)(6041248)(20161123560025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123562025)(20161123558100)(6072148)(201708071742011); SRVR:DM5PR0701MB3813; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:DM5PR0701MB3813; X-Microsoft-Exchange-Diagnostics: 1; DM5PR0701MB3813; 4:GDn70MifXtFkqxEzmkW9GXUmEDxUCkn1BB7NJCKI+B+ZFfTAE1bLR6g9hde2vlTXy8ep9LPOkGKgT1sM/bZG2B73p1xPuETysVxGUgr4LSYAQ3c9oPegfMOVsDjPwt0OO7Zpfx7A6naFjU4PWJ2aUOXdzlTCu6R3mdtq0Cb2gb6IpJrsuEIZ47JwUKdcYafy/ebFttrcJsAH0a52HX4H/l54d19k6FhGH/d/4D/CuRcmq31ttPPABicmx/YEJ61y3KF29UlwrgTXJ8bst6TjnpR6BVd8Z1dd9kJqh0up2zsS8VSTs5pojN+ofzdqEOS8 X-Forefront-PRVS: 051158ECBB X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR0701MB3813; 23:m19m5+PBZHE/TjO3SWNc3fwIomolX9V/icExH2r?= =?us-ascii?Q?YZjkKHfq12K2fJrcGJ9PJp5Kbn0tCP5BTQfOEqKBnh020wp2XSoW9gr9Z5wr?= =?us-ascii?Q?aIftqBAIqG5fQCXazeIUOZ7+0OwpaqsvLR8dupm9+UR30VngixpUFL5DQm00?= =?us-ascii?Q?RLIk2HdcVer0DJ3ipGgYtqew0GYcS9PA8n3I26kYjSO4DGmmjE/7PQMfJH0O?= =?us-ascii?Q?7CB9Ub1jE897PqsaTamaMPPH25G5o5yPCbaM7+tddv6VN6oZURHR2fMLfjqZ?= =?us-ascii?Q?E5OZ6XpMxOyTerd29w6XWUiWwV1I+gsLw7hwQOPYTNGI83HMKK0lK3xFh+2r?= =?us-ascii?Q?PmkxJQAZdtNaTOahvijbJrlKsBjb0fRSryu4OO6d0dPYf7fmv4AFboPFNKcY?= =?us-ascii?Q?zXmriy+9fZNEjzzFzSw/vxHLtki8z+bSamlK5B30uE2lWiil69sQNkpzZZJB?= =?us-ascii?Q?1g+zWcpklsFtTMSmnVoYjtrRUfTb8i1N5SsU2p52HTssvffnxmR/PMmK6ag6?= =?us-ascii?Q?O+97bdL24mYUdCvaz4TzCAT8vSXbKZ8/IrEAtGVth4cxkXVCQVaigm+3Lp5Q?= =?us-ascii?Q?sGkXnaSLRJSnngp6DCVadQzZOFoLBkJOmhmuHfCh+7EtTFhuJZSPcF/I13Xx?= =?us-ascii?Q?WCG/Ss9OJa+snz7MhvwRAvEm5xw1iOWN9F7b/hjG9wp7MhmZ3AuJYBsX7eyP?= =?us-ascii?Q?ekMpHtnBGTPnklfJhRLVcG3pq0xuK+ip3Tm+9VHfirzMBm1uqM7Pr+vEXez4?= =?us-ascii?Q?PLyPraqF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DUnWg4lynTOxYqlR6RwODFrsRwcWJdTOkfFBpWuxPK4TzfGUpG9R7CQE2UUPYXT7HbyNl1FyM8OIjk2MHJgh/ggY4iUEjjuIIaHze5tihB9n2BhQilQS+20n9JHZFg6hVadZvoaE9VCoHGZJ3oKLYjGnGygtNc1 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Dec 2017 22:45:52.8578 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5d17b91e-81cd-43d2-f3ab-08d53b68c649 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: DM5PR0701MB3813 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; }