From patchwork Tue Nov 28 19:34:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10080933 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 82B95602DC for ; Tue, 28 Nov 2017 19:35:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 771AF26D05 for ; Tue, 28 Nov 2017 19:35:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6BA9A280B0; Tue, 28 Nov 2017 19:35:18 +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 BE38D283CF for ; Tue, 28 Nov 2017 19:35:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932145AbdK1TfQ (ORCPT ); Tue, 28 Nov 2017 14:35:16 -0500 Received: from mail-sn1nam01on0049.outbound.protection.outlook.com ([104.47.32.49]:18800 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752639AbdK1TfM (ORCPT ); Tue, 28 Nov 2017 14:35:12 -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=1NzHvDzb7nxbgQYfuHWhqNgHF0eZznaLDQPv6lj4EMY=; b=Z2yryVuTmCAQ1Hjh3uAFnc3ZTKY0EVNO52Zmcg2OyQlYNmL6eMxvAkRQ6y1+LzuDG7wI7+rTrjRfz6F4fectkqh7MtlhewLx1ofb0ZyLVrqZzQt5cXSR6Q4O5YpHVKbgK1HKjPqc5sbV/WwZEfYXrbq8bJZNQKA6gWVIqVZkg3A= Received: from CO2PR07CA0044.namprd07.prod.outlook.com (2603:10b6:100::12) by CY4PR0701MB3810.namprd07.prod.outlook.com (2603:10b6:910:94::28) 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:11 +0000 Received: from BY2FFO11FD017.protection.gbl (2a01:111:f400:7c0c::151) by CO2PR07CA0044.outlook.office365.com (2603:10b6:100::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.282.5 via Frontend Transport; Tue, 28 Nov 2017 19:35:10 +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 BY2FFO11FD017.mail.protection.outlook.com (10.1.14.105) 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:10 +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:04 -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 vASJZ48f013742; Tue, 28 Nov 2017 11:35:04 -0800 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id vASJZ41d013741; Tue, 28 Nov 2017 11:35:04 -0800 From: Himanshu Madhani To: , CC: , Subject: [PATCH 03/22] qla2xxx: Move session delete to driver work queue Date: Tue, 28 Nov 2017 11:34:44 -0800 Message-ID: <20171128193503.13695-4-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)(346002)(376002)(2980300002)(428002)(189002)(199003)(87636003)(81166006)(2950100002)(6666003)(42186006)(80596001)(189998001)(16586007)(69596002)(72206003)(54906003)(110136005)(478600001)(316002)(86362001)(8676002)(51416003)(305945005)(5660300001)(81156014)(575784001)(36756003)(47776003)(356003)(4326008)(50226002)(8936002)(33646002)(50986999)(76176999)(1076002)(48376002)(105586002)(106466001)(2906002)(50466002)(101416001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR0701MB3810; 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; BY2FFO11FD017; 1:b9bdvJDwwwcVK7NtS8vMsQrtPiNStLw/DLbhN/WNBLHff7D+nQvC5LVfSqMvmbNZZ9frqT1wqRJUJaUVohv3BQnEVJjQlQJw7VkfvYUvPk0KxTsKfDq6206gVa6hU1Ln X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 61c34eb6-5975-41b7-e19f-08d536972394 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603258); SRVR:CY4PR0701MB3810; X-Microsoft-Exchange-Diagnostics: 1; CY4PR0701MB3810; 3:6xXniLv7E+WbAxKPgVxDBooabnzL4iC3KTJP+sZZuxKezIkmf8GTXriAbzPaa8p8VmerkDuTEoJ5RrHlG6owoZA6wds7g32fiW7R8RoQcwi9NApVxn0ChaQbvQsmPwMnSlKsNc5SP6nix2MFNzIZHxGpFyfamlmjS+BtnLRh1wg9n+U5uZ+Pf4W51gFnVZ/h7UsWjzyjtvrMev9ZbL+H1D1QGRLRNXyt6EaGT/B/KfvmHN21XnKpF6Tu8vT37omHxTJM6fhU3VoZq2UgfzADslRc0DIbY/kgv9ZdmJlN8MGM+o1Y+Idgyu6Kj1ym/35q8vRbsT31ScTsrv8lnRFQEarcGgtmeYG+Q5TVIx0GBe8=; 25:aFSDFdutXk63KN4KUapa8Xxu0t++GE9Gw6Axf54aN/MimaLfow5xs51kaeSynp7z3SxT3UbWp8lYFrQWDL7BiAVmZfUUI0Akq4z1BFXzFtHmq4aYn0OKBe61ZxG1weLuDcTS4QXx+eFGm4YuPtO13Q4/mgNm+iBzWeJrQHLRlyhwGNl3qhvxAIsMihbNOKYlZ4IAcQ6/VV3M1W71wCGmvHyhj47uAmeReAWg4zhO61NWalOW2QwLAK7azHkfoW7elxw1PHQXbkY1NW7evzMCIa8M36370Q7E5DibXNJR1a+QNQqIAFSjZ2fR6/BwTNArIGLCYVanvqYuboe0/3ce8Q== X-MS-TrafficTypeDiagnostic: CY4PR0701MB3810: X-Microsoft-Exchange-Diagnostics: 1; CY4PR0701MB3810; 31:Ch3HHghtrt0sYhdIjsMdL9ap1gfSjXhBfcGh5faO22Unc8mMIIHVPfwM0LxCgscB8AQ9uZXvaQQyMgJPdJbGCg3Cviq88oV3MdCWnwXlaUupSDCfnTtQX20nFLiYlB8sqW03Jl05WHmJNwRx282xRCymjqZyep0EK1E9mib+VOq8fO3iOWXktQkmQm95Hql6753uM0LimeWUGcbDeFfRvHFc+hOpM7GwS6jFN/Hyjkk=; 20:aZj+bCg7yvFa17xrY5d9QoKFIV0MX30zyL1Iwh9WP6xoQfkJo+JgjfOudwY4Je86MAelAknXVeHf/HBbrn1/gKlWSZIEa9gLt+EFVc0w5ArdaF5f4Nzukv2zBpsIdfzNKA62cnZh6kFOnCdVISe8Vj5abTsMI1hNmZZLkJbAIOEJJHSUv3zppVhEo6i9mXUzdg63wgwZ7tpRP67GrbsQJ6qaeNSrq/QNVMFGmAcHksCobayBD8rXLKfRe5dx7v7CshvUIwSmjxSR9HP/nUNZApLcg+uBq71VQUe97y5f2uBpUPrni55HLueMWOAmEeNVVMmLPKxbcgtEy7+NmdK4ul5tSBRjMTzjZnyEfhXfy3f6cuiyUsO/6hvCS1Z7BACjrgVSS3vQ5mYSLayqCpoFfU8Cu3vRJLNJWYrMjcE9VQMJ/b3pCT8ccKYTGxZZCFpCfRpNXUqdy3I2/5yDgvuxNoO3dyz5aBH4f7i1qfDagVyYL0M67+PrM/mTBw+nq6B0 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)(10201501046)(93006095)(93001095)(3002001)(3231022)(6041248)(20161123564025)(20161123560025)(20161123562025)(20161123555025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:CY4PR0701MB3810; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CY4PR0701MB3810; X-Microsoft-Exchange-Diagnostics: 1; CY4PR0701MB3810; 4:VCTncZcLVBQYMyePr+C5/PHV4TXsyPIdYtFawkuwds3sPm0NOEWgx40QJTqJwdDvOFAwesRBF4uBA4giS+XYTW093qP1w4c4UAdbnMmJ1tnRzy4BVA7L6ot5583CXAMVpRT/j68gI9RmL78npXPFurBIOWfGHdgTVYK1HLQgmtQOv+8MTMq/QZSTljk3i6z0o/ZLHKOUu+fpxNsdx7wt2iR1eXKeF/ulIPLjwpt74lg7I9wj5ESK6snCiJ2i4ricJbPVswU8p8KVrqh+O2zKQMZ7hxSI6vpCa1c9WGge0nNp/TgeOEr2Xco/d5jxWv75 X-Forefront-PRVS: 0505147DDB X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR0701MB3810; 23:Rz5XQG6OzoYX4Qts5yVaX8rdXpm5gJwY1VIPOBN?= =?us-ascii?Q?uY3BiSjBsJEPqLXzRmkD3DNJ6hbuMNSzzpYI1YYX/apsCUMOYGMymdAIgr6v?= =?us-ascii?Q?IL5NsJxlXRhjsitgBSdbkFWNqOvyFgGGQ5lTeEMrSd+VrwyTbkrU2LsqMG68?= =?us-ascii?Q?BuuUAVdSljD7jgESZBersbP6wsHx54ff/3du7SGNukIJHIMRxtAh7lkGd6Ca?= =?us-ascii?Q?YkRcV9xx6Y65chmT6+u6lsEXpXVOYt5XWwE6BX+0BQ73fcyHgkey2dn74PmV?= =?us-ascii?Q?v+joaQgL2nH0/BoFmpfsrSPJI52xPk/ss+T7uxayibeKtbo3mjp6d0vA8mN8?= =?us-ascii?Q?vnaWaGCV8FADi0RpTpYkuHq7nntfY0FJBjk/H+FHowmzxzxND4j52zymbL4C?= =?us-ascii?Q?4r122Nc1mRgdQsFBr0btzeiY8ISIfDJAv348cLDEIDHCI3bI3hBtgGVcrmY5?= =?us-ascii?Q?aORG8smxdgVvKptg2G6fYcjeQf0agk54ll0uCqKfyFVv0suaudCOHuhkJ6jC?= =?us-ascii?Q?a3gI7G5Rafli8hb9S4GDiGqofB4GK5hJoXiCcDsVYqlKIjYVKztmR1D1PPZi?= =?us-ascii?Q?yPQNfWUbLo7ECVHMBEZ/fUhsKgpA+G5wCI3lBIOYouNkUMnNiWxO3xfyID5k?= =?us-ascii?Q?tRt7RY8PYK8SdvZbuUi7Al6UhLLGfB/f3hq7aBQVgnfyNO6oNq7etWjnQkn5?= =?us-ascii?Q?1X2ysyB1dTkqCZnJ/z/9WaRPnr2L7qrQ1+ETxYDWXPGnS5GbTJR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ru0KiAEfpMYa61UQEQ9J4sKhLZQHjf3Uf2aDdzDUKtqqieyG47NF9PxNW7SWcarA1qfO5/ZImKpaYz1VXD2DXFdX3AFeqiPyyL7rpO6F67zKIC/GtbxQ59CA+ztw/8kmHKAE6YeKvCQt2u8o7KHrbuGdPme3PsLUh+Z0IOb41pKPLrUuSZX2GFlmd0iMQV5JiEqljVJpHXIZYK07ie6qNMb+SkJo8wbOENx0+YB+l0oKhLaOOIPqS+B45tqyqn SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Nov 2017 19:35:10.5530 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 61c34eb6-5975-41b7-e19f-08d536972394 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: CY4PR0701MB3810 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 Move session delete from system work queue to driver's work queue for in time processing. Fixes: 726b85487067d ("qla2xxx: Add framework for async fabric discovery") Cc: # 4.10+ Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_os.c | 3 ++- drivers/scsi/qla2xxx/qla_target.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 46f2d0cf7c0d..dfbf82e716b0 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -3193,10 +3193,11 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) host->can_queue, base_vha->req, base_vha->mgmt_svr_loop_id, host->sg_tablesize); + ha->wq = alloc_workqueue("qla2xxx_wq", WQ_MEM_RECLAIM, 0); + if (ha->mqenable) { bool mq = false; bool startit = false; - ha->wq = alloc_workqueue("qla2xxx_wq", WQ_MEM_RECLAIM, 0); if (QLA_TGT_MODE_ENABLED()) { mq = true; diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index 1259ec85ec0a..924d58f5408f 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -1205,7 +1205,8 @@ void qlt_schedule_sess_for_deletion(struct fc_port *sess, ql_dbg(ql_dbg_tgt, sess->vha, 0xe001, "Scheduling sess %p for deletion\n", sess); - schedule_work(&sess->del_work); + INIT_WORK(&sess->del_work, qla24xx_delete_sess_fn); + queue_work(sess->vha->hw->wq, &sess->del_work); } void qlt_schedule_sess_for_deletion_lock(struct fc_port *sess)