From patchwork Thu Nov 30 03:40:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10084175 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 3174E602B9 for ; Thu, 30 Nov 2017 03:41:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 27E1C29935 for ; Thu, 30 Nov 2017 03:41:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1CD3529B02; Thu, 30 Nov 2017 03:41:04 +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 9F86929935 for ; Thu, 30 Nov 2017 03:41:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753285AbdK3DlC (ORCPT ); Wed, 29 Nov 2017 22:41:02 -0500 Received: from mail-sn1nam02on0056.outbound.protection.outlook.com ([104.47.36.56]:19653 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753066AbdK3Dk7 (ORCPT ); Wed, 29 Nov 2017 22:40:59 -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=lGIvuUO7kUyfGxbHeZ4QiiuA8koWhsIGos0i4oN92LI+3dl9NwQ+/Ut7oIZU16R4VfllwqWmKGNg8z+igSzCwTo1cwdGeN5MhgmZmmjAFwTk3WZ/tJGWBDKxE3aHBwuYAQyTkqdTqu2BkurMyPlXMNWZb9hWLtB5IZ5Xb17gXXg= Received: from SN1PR0701CA0015.namprd07.prod.outlook.com (2a01:111:e400:5173::25) by CY4PR0701MB3812.namprd07.prod.outlook.com (2603:10b6:910:94::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.282.5; Thu, 30 Nov 2017 03:40:57 +0000 Received: from BL2FFO11FD056.protection.gbl (2a01:111:f400:7c09::148) by SN1PR0701CA0015.outlook.office365.com (2a01:111:e400:5173::25) 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:40:57 +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:40:57 +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:48 -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 vAU3emnT015117; Wed, 29 Nov 2017 19:40:48 -0800 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id vAU3emT2015116; Wed, 29 Nov 2017 19:40:48 -0800 From: Himanshu Madhani To: , CC: , Subject: [PATCH v2 03/22] qla2xxx: Move session delete to driver work queue Date: Wed, 29 Nov 2017 19:40:28 -0800 Message-ID: <20171130034047.15070-4-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)(376002)(346002)(2980300002)(428002)(189002)(199003)(316002)(106466001)(42186006)(189998001)(575784001)(2906002)(110136005)(105586002)(69596002)(16586007)(51416003)(2950100002)(72206003)(101416001)(76176010)(50986010)(87636003)(4326008)(478600001)(6666003)(50226002)(356003)(86362001)(33646002)(47776003)(5660300001)(81156014)(50466002)(80596001)(305945005)(54906003)(8676002)(8936002)(48376002)(36756003)(1076002)(81166006); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR0701MB3812; 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:U3uuC4NuuJVbybTNl6PNZvJ5DZGlK5/Z2okurjqcubaluZAg7UU/f0AQ5GoXZnvo+vitLFYMHhWO9B1gjbTOnAlDRRs2Jf404TTTvD8lmVliWrgudjmWGHu57ElVPE/N X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 216ea13d-7ce6-49ec-cfc3-08d537a42aca X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603199); SRVR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; 20:L5LHIKRIh0+ZqId7edpmTjF/fLNLBRAhyfnIz7cSC1nwscqQrVYB0ZrIxGxNhjqGbymAGYZbx5e2POryYCraJiTzCPrrCe71v6XSdTLoJV0wdaizSAjWrTykNWTqJGZeibx7IAcN5sZmjHdox/hVXKMmK1nPn+RITZF+EdQJulKPs67JGWMjrWsYuYdJ0YeujzDVsKPXlwrxN6nLQp8tKJOKpHBDU/Exs3H2DkHxAMrWRAozgp6xojErzxY19iqQAHDuQk4zAj6L/btJDaTpOal5OD+j1vZlMRjiE7gKkdmZm+ks/+GuxlvVlYMUXSF3sk+F6TIiEv+jThbK7nIX/HYeFDi1xtUNfShgSYED2+MPxifSeVeIjRaCIKcNAEuGFdlysQ96iYn+Pay7B1cioh7+T1u2X7E9WUjx4QUj+VBGMd/9DMGY2GDFOXL+Ib/78JFiw/CXMzeBHBvYPhFphYEDpybBQnZozrKxoJzVo5V5vWn0AE2loXmJvBLmbipJ 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)(93006095)(93001095)(3002001)(10201501046)(3231022)(6041248)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123560025)(20161123562025)(20161123564025)(6072148)(201708071742011); SRVR:CY4PR0701MB3812; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CY4PR0701MB3812; X-Microsoft-Exchange-Diagnostics: 1; CY4PR0701MB3812; 4:tsN1uKFnDTvYk/EmXb3eduxvCMu9UPYtuTBTnLvTpJsVTrUGoI1iXfKQWj0VQvYUXQfqTxYbDhyv0iXfLxrJdAnTiUYDMkK2kJz9I3LEv0Ww5L6r5LmVbOsgs6HWiQr+TFuLhW5bEZ5F/kTf4H4Yl9SVccxSs3XNB8DDHbFsbZSxXtzh+8zz+oCZ4bRq6TSN02nUeWKkRM2Iy6TMNw5WRCRRlYjm2AZD+wN0eD8bkuWHy6s9tNZJhcdznEBAy7oMyQ0I6ojo462v6FqO+wSIM8pNZicl4AAw1C/YXmc80xx9GAztARPBUreghqT6WHmQ X-Forefront-PRVS: 05079D8470 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR0701MB3812; 23:YrJc3txMKDyPzCmy83pHjdqfziB5v4rat+Z9JQq?= =?us-ascii?Q?5NxNL91bDJ5Kh2OuO/mU1xK3p9U3VyQ7iJJS//cYGJKVJuYP/jQti2ZBkuy/?= =?us-ascii?Q?DCyJ7ctLveMdm/BiR4XkD3TIFuWQxN+vTYcgb+VrN0L4KertzHuMsosgRId2?= =?us-ascii?Q?eIpshIbclW/WdrzMP/pcH1O0r7RtAQ2GZJ0v848vABxuxQJYuLQREfVo0RCx?= =?us-ascii?Q?XptgcB7ljZ79tM5pXXQ+MXfQjCT2gMYw+KCEuoLJg43ayg0sgJ1ifug0l3ly?= =?us-ascii?Q?3YKYD42R6+Yh3Mv+/LRXWvYE6hlrdila9Tbm2CifM9510euDRIfovsjEYEdU?= =?us-ascii?Q?OL7wBaEK719IR13WuEfwtISG+oBetU73ypmyIp0zXm0TiJfFSFsyLUBnLClg?= =?us-ascii?Q?As5mO4FTec2VGDtOl4uWiQr88XgVxnpEMAgB6dY3Sx66lKIsbE/l3TgeeSnN?= =?us-ascii?Q?cZ5roWuyXmV/d+gbdWGpGmTeNH/mtN2p2OnIWfDncZeWOaP4HHo/ksTPqhZg?= =?us-ascii?Q?K5v1RH9F0jxv1smGtNeI5E8y8EgBR0l6IHDpvduQZ5pXx2QG0sptjd5RBAYM?= =?us-ascii?Q?P7BP8i4X3axiaE+SyMiCkHC7fTGfYW163VM4xP0z5C22dRXBaBulB1vVjUWE?= =?us-ascii?Q?jp+vskxn9GmloBreeculxwCY0mqS40WY/wOE/4UDeivWda/0qpt+dbVHUiez?= =?us-ascii?Q?Ix1/ZNACKNSpGS+ChpX2VxbgItXdfrSayz/8O5dcqdNCtswyQVk75HJ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DGkeFls72IdpMCffploU8QfFya42bCI/+SKjsFIK84TpsTCexy2UwDKWEUT/0o6y7JM2URrPJthDwd3Jsp0e+iVPMe1zg3QX+wzb9EtaKFeydCuMvsJKbz4s6c3oB8afr6wQbGFsQyYlhz6Wr24wr4dYlgIU0QJZIYYbhcE5zU1vaiYnJk3aY6Hgm9+2U9ZrnvbL9d0hgDLTaimPADdfMS+YzYoulbHQLVGJT3hQ76ITh SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2017 03:40:57.1460 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 216ea13d-7ce6-49ec-cfc3-08d537a42aca 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: CY4PR0701MB3812 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 Reviewed-by: Hannes Reinecke --- 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)