Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp162746ybm; Tue, 26 May 2020 13:24:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzqNzbDmv4ISbzKWTL2c2Qs0Wx51xEncTrMwt+7WosISix4jrmStAIypx40BZn/GinIwHg X-Received: by 2002:aa7:cb8f:: with SMTP id r15mr22480270edt.120.1590524681459; Tue, 26 May 2020 13:24:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590524681; cv=none; d=google.com; s=arc-20160816; b=Rfz3BWLoT5AC5XsPz/GfebakutR3mU+/1LdLyvYXNdisCCZNGiy9vLhveJDdaR99N6 x5ZECItE+lQMLsM37T9KFZQkSYvtpeRpIxfr0OHJlHxPts52GJ+NRMc2Nlxry156ZXCx N/2GJEraJrbjpEfU29dqMx5HSQkLRY0/An36/oGAy2bW0o2Agt6ujVxqMp4lO8FbVtgf ckvES0Yn3M5BPHBbj9GJje7/7dBPDpCKpujQxbSqpVivLpBB6WbfBGBlZnlPxeU5e4Jv sKEsZG0otiZnUXtabXPb+tT6dJnS4bycL+DmsFLNR3fn+ZgSH8bBLP6nty5fgMwoIAWp pY+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=42h/KA8dw0RYvpa/8+N++pU0IABZDSsiOWS5dEDTe/8=; b=Ww5Ew3GfYXxhSz5yaCZFgB+EHee5r1+MRQPCaDds7S8t+4SVzluPmUAAFPeRyPN2uO HS+mgyRcm0f1tCehKGVYvWS8hbhHGocaDEZh7PFUgoBC8WEwCpDY7n0QqFkF4C4RGWoW 29IrvTaspcl9mPxttoZkr4yu4A/XCjZZOKRFV24QEJtKBHmBFGkUQJEW8NgQkE7hKslY zKla++nlFVIFMdpd9rN11T5sR8dKvncgHZ1xSqfh7/85ZBBLP4q864AWSdb9OinqOSzR vOJU5b/9g/3iM5Gzw1ZLLKqxBDD5lFlbe3bMTZMosYY/zuiKcMWlH2aVQo85WPZdPhFo gHAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1tpWRDsu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qu5si456317ejb.365.2020.05.26.13.24.17; Tue, 26 May 2020 13:24:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1tpWRDsu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391192AbgEZTDT (ORCPT + 99 others); Tue, 26 May 2020 15:03:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:58460 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391185AbgEZTDP (ORCPT ); Tue, 26 May 2020 15:03:15 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 35DBE208C9; Tue, 26 May 2020 19:03:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590519794; bh=21kYSuG0pFowDVai7SHBUxnwhgPk+jiqxAqlxf/Ywrs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1tpWRDsu7WzR6bbKdVaJ3AIsxR+0houG13EyMBBtseg2OKRHJGZwKAHwJndTTOyOc aBUSp3I+U3CBnL1OAOqk6Enuam2cqiAaZBzTBqZCwSeFr+UVgojh8ZvGI0UMoSThQb t2aftJmCHLQYVf4SCXPaB2TtwhEbofhq5fpOoUnQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Himanshu Madhani , Quinn Tran , Nilesh Javali , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 4.19 20/81] scsi: qla2xxx: Delete all sessions before unregister local nvme port Date: Tue, 26 May 2020 20:52:55 +0200 Message-Id: <20200526183928.889022046@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200526183923.108515292@linuxfoundation.org> References: <20200526183923.108515292@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Quinn Tran [ Upstream commit c48f849d3f7a4ec1025105f446e29d395c4dcc2f ] Delete all sessions before unregistering local nvme port. This allows nvme layer to decrement all active rport count down to zero. Once the count is down to zero, nvme would call qla to continue with the npiv port deletion. PID: 27448 TASK: ffff9e34b777c1c0 CPU: 0 COMMAND: "qaucli" 0 [ffff9e25e84abbd8] __schedule at ffffffff977858ca 1 [ffff9e25e84abc68] schedule at ffffffff97785d79 2 [ffff9e25e84abc78] schedule_timeout at ffffffff97783881 3 [ffff9e25e84abd28] wait_for_completion at ffffffff9778612d 4 [ffff9e25e84abd88] qla_nvme_delete at ffffffffc0e3024e [qla2xxx] 5 [ffff9e25e84abda8] qla24xx_vport_delete at ffffffffc0e024b9 [qla2xxx] 6 [ffff9e25e84abdf0] fc_vport_terminate at ffffffffc011c247 [scsi_transport_fc] 7 [ffff9e25e84abe28] store_fc_host_vport_delete at ffffffffc011cd94 [scsi_transport_fc] 8 [ffff9e25e84abe70] dev_attr_store at ffffffff974b376b 9 [ffff9e25e84abe80] sysfs_kf_write at ffffffff972d9a92 10 [ffff9e25e84abe90] kernfs_fop_write at ffffffff972d907b 11 [ffff9e25e84abec8] vfs_write at ffffffff9724c790 12 [ffff9e25e84abf08] sys_write at ffffffff9724d55f 13 [ffff9e25e84abf50] system_call_fastpath at ffffffff97792ed2 RIP: 00007fc0bd81a6fd RSP: 00007ffff78d9648 RFLAGS: 00010202 RAX: 0000000000000001 RBX: 0000000000000022 RCX: 00007ffff78d96e0 RDX: 0000000000000022 RSI: 00007ffff78d94e0 RDI: 0000000000000008 RBP: 00007ffff78d9440 R8: 0000000000000000 R9: 00007fc0bd48b2cd R10: 0000000000000017 R11: 0000000000000293 R12: 0000000000000000 R13: 00005624e4dac840 R14: 00005624e4da9a10 R15: 0000000000000000 ORIG_RAX: 0000000000000001 CS: 0033 SS: 002b Link: https://lore.kernel.org/r/20200331104015.24868-4-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/qla2xxx/qla_attr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index b008d583dd6e..0ab9d2fd4a14 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c @@ -2162,11 +2162,11 @@ qla24xx_vport_delete(struct fc_vport *fc_vport) test_bit(FCPORT_UPDATE_NEEDED, &vha->dpc_flags)) msleep(1000); - qla_nvme_delete(vha); qla24xx_disable_vp(vha); qla2x00_wait_for_sess_deletion(vha); + qla_nvme_delete(vha); vha->flags.delete_progress = 1; qlt_remove_target(ha, vha); -- 2.25.1