Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp124872ybm; Tue, 26 May 2020 12:23:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUA52dTw1BzqdS1HhtWzDgTpcG0DadgtXZHPwZCNk5Fr7PwM/mpF7dysfMezjq91rOR3LB X-Received: by 2002:a17:906:6843:: with SMTP id a3mr2347974ejs.245.1590521013950; Tue, 26 May 2020 12:23:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590521013; cv=none; d=google.com; s=arc-20160816; b=BLMIkRS8Uut4c4MI/ZM/Ja5yZap8cB5leeZPZOyxjtrr0hrg6Xvd41bwq54jUQKB8S obOSGqS944URdLLyzLpBIX99cNw+CGw0PCujt1aEGDSVhoBoERC7LRpt/pCFB2KRaoTf yMy/kRRFfPmoUsoe7gQALo7PXtDXOd/KgeKSKmkaqABlG9549XI0FlnKlCb8F0NnR5mQ tlhZ/IzPOh2kPQ5ekhQksKQhf2WA6dx4Frt0pvKLJnssc3LnmTS8xfj66+tJPrjXb2iW 0jlmWZB9e81olKmiN76FoQ9e4mx3vrLlNVSS/2dxY+4UWfuna/3ieL/9/JJWdekqNr9A v+KQ== 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=JvOv0NPvRV4s/WYWjSXI/m7zdkn9fcLiEN8L5zmc2So=; b=x42pUSf4wRpDgD/bJZ8kdp/9Zn0t+KP1wJ3Z+tCo5x8/4JDaDo2P9ZrkHOIzplgckz kBL56pEpcPFGcBJWBwDp9HiOaJw/6gj2vc8AjHJzUhYBD7ygFwi0bFCUBj5hCnciqtb2 Ylf4bqgj8BeeYcOx7nkNwMUKTl87mZnmFB4YVWPV+t0HCQn7VvtdE/rGPuTpT71tV9cP 2FUqLMIsahZN861NM4qgnlb3p/EKrDY1T8qn+AZq5xypjBe2gA6vZv6cZOfxgvY0S8M8 axfubidd+sFPkOwBYqn9nsT0yn+trEINzcqZsUNSPDxujuMguY6V1pur/mlqO0b9NLk7 QENA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GRehLAe0; 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 h10si414117edz.368.2020.05.26.12.23.10; Tue, 26 May 2020 12:23:33 -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=GRehLAe0; 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 S2404178AbgEZTSj (ORCPT + 99 others); Tue, 26 May 2020 15:18:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:43906 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391970AbgEZTNh (ORCPT ); Tue, 26 May 2020 15:13:37 -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 6FDB2208B3; Tue, 26 May 2020 19:13:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590520416; bh=ONsYDddsZTVKtfoCed08ZnVV6GO76273vrFEOVSs5A8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GRehLAe0vCwcgZZhg8JG2mlo9ZIFxGrnPZgecrPv9NI1q5hNgJY6pfb/jUAaVQFlB knIV3X3Zp2uXBcQMtomhhhlJWwwpU6XhH/p6mLa/Y+kkpf3lOBLrU2zDwXzOcwp5/S LKC5OpVSfNqwOuZw8GMfqcurH8Snmhf/XYSqbW44= 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 5.6 030/126] scsi: qla2xxx: Delete all sessions before unregister local nvme port Date: Tue, 26 May 2020 20:52:47 +0200 Message-Id: <20200526183940.315220710@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200526183937.471379031@linuxfoundation.org> References: <20200526183937.471379031@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 d7e7043f9eab..9556392652e3 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c @@ -2928,11 +2928,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