From patchwork Tue Jan 7 20:52:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 234419 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3051BC282DD for ; Tue, 7 Jan 2020 20:57:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 011642467E for ; Tue, 7 Jan 2020 20:57:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578430627; bh=2ELgMWu3X5VHs9aQWl60YfTlsvdPjjVBVl51OAFztvw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=rnbPlHDS80ZMFJYBEYTpJJLPY5CUFwhGbbslg5k5K3176OgZCg6jo3d02Mp8f9v5h 8OwWDhYQhG/rlsOGFftB4JZI71pFMVSrDtsUk4TtQUK9OlYnmK10G9J6HhhKZaA8WV GoID2yHJrdjF8SFnwSsHMPEkewv+mAm7iNile38E= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727421AbgAGU5G (ORCPT ); Tue, 7 Jan 2020 15:57:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:53438 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727402AbgAGU5E (ORCPT ); Tue, 7 Jan 2020 15:57:04 -0500 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 F041420880; Tue, 7 Jan 2020 20:57:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578430623; bh=2ELgMWu3X5VHs9aQWl60YfTlsvdPjjVBVl51OAFztvw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KQIiJrQQ1+D1boPrEqoa0gr5x/pAdUNW3MlZCPOpcgOM9/6MbEhAxDo0RNP7YPWwH RF1llE5e+xjzAmHusFXvnp0vpb2c0s7YVk48O5GnaMfZYW7bX/IAxlh2R/48oDGePQ PEFFHp88fM7e3+ITaq4tuZ5BmVGO81mi6v+JSjnU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Krishna Kant , Alexei Potashnik , Quinn Tran , Himanshu Madhani , Hannes Reinecke , Roman Bolshakov , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 5.4 029/191] scsi: qla2xxx: Send Notify ACK after N2N PLOGI Date: Tue, 7 Jan 2020 21:52:29 +0100 Message-Id: <20200107205334.560228200@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200107205332.984228665@linuxfoundation.org> References: <20200107205332.984228665@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Roman Bolshakov [ Upstream commit 5e6b01d84b9d20bcd77fc7c4733a2a4149bf220a ] qlt_handle_login schedules session for deletion even if a login is in progress. That causes login bouncing, i.e. a few logins are made before it settles down. Complete the first login by sending Notify Acknowledge IOCB via qlt_plogi_ack_unref if the session is pending login completion. Fixes: 9cd883f07a54 ("scsi: qla2xxx: Fix session cleanup for N2N") Cc: Krishna Kant Cc: Alexei Potashnik Link: https://lore.kernel.org/r/20191125165702.1013-11-r.bolshakov@yadro.com Acked-by: Quinn Tran Acked-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Tested-by: Hannes Reinecke Signed-off-by: Roman Bolshakov Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/qla2xxx/qla_target.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index 18522ac79d9e..74a378a91b71 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -4803,6 +4803,7 @@ static int qlt_handle_login(struct scsi_qla_host *vha, switch (sess->disc_state) { case DSC_DELETED: + case DSC_LOGIN_PEND: qlt_plogi_ack_unref(vha, pla); break;