From patchwork Mon Nov 25 16:56:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Bolshakov X-Patchwork-Id: 11260671 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 469D3138C for ; Mon, 25 Nov 2019 16:57:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 23A882068E for ; Mon, 25 Nov 2019 16:57:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=yadro.com header.i=@yadro.com header.b="CnrIVa2r" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728974AbfKYQ5X (ORCPT ); Mon, 25 Nov 2019 11:57:23 -0500 Received: from mta-02.yadro.com ([89.207.88.252]:39666 "EHLO mta-01.yadro.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728864AbfKYQ5V (ORCPT ); Mon, 25 Nov 2019 11:57:21 -0500 Received: from localhost (unknown [127.0.0.1]) by mta-01.yadro.com (Postfix) with ESMTP id 43C4843E18; Mon, 25 Nov 2019 16:57:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yadro.com; h= content-type:content-type:content-transfer-encoding:mime-version :references:in-reply-to:x-mailer:message-id:date:date:subject :subject:from:from:received:received:received; s=mta-01; t= 1574701039; x=1576515440; bh=rZtO/wergIa6ItjIvB5eZMH7G8WaU+ruf1M CLEYwfYE=; b=CnrIVa2rdrh9CU3zZIREENU0X8mq3YDbagPXljuzLYqOt4DghD1 YWdzp8ymBy7AHpSLe9S/RUoa2iyYRWsljVb39QocjX9sijU4k9HxAEQM/DrXMlQO DbUnTxYviMgk3orvSGMaV9ujVBfsYlysaBib+tHA56f9k1K0dVyUrQ08= X-Virus-Scanned: amavisd-new at yadro.com Received: from mta-01.yadro.com ([127.0.0.1]) by localhost (mta-01.yadro.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XUiNOmX0nY04; Mon, 25 Nov 2019 19:57:19 +0300 (MSK) Received: from T-EXCH-02.corp.yadro.com (t-exch-02.corp.yadro.com [172.17.10.102]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mta-01.yadro.com (Postfix) with ESMTPS id A186F43E04; Mon, 25 Nov 2019 19:57:17 +0300 (MSK) Received: from localhost (172.17.128.60) by T-EXCH-02.corp.yadro.com (172.17.10.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.32; Mon, 25 Nov 2019 19:57:17 +0300 From: Roman Bolshakov To: , CC: , Roman Bolshakov , Krishna Kant , Alexei Potashnik , Quinn Tran , Himanshu Madhani , Hannes Reinecke Subject: [PATCH v3 10/13] scsi: qla2xxx: Send Notify ACK after N2N PLOGI Date: Mon, 25 Nov 2019 19:56:59 +0300 Message-ID: <20191125165702.1013-11-r.bolshakov@yadro.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191125165702.1013-1-r.bolshakov@yadro.com> References: <20191125165702.1013-1-r.bolshakov@yadro.com> MIME-Version: 1.0 X-Originating-IP: [172.17.128.60] X-ClientProxiedBy: T-EXCH-01.corp.yadro.com (172.17.10.101) To T-EXCH-02.corp.yadro.com (172.17.10.102) Sender: target-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: target-devel@vger.kernel.org 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 Acked-by: Quinn Tran Acked-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Tested-by: Hannes Reinecke Signed-off-by: Roman Bolshakov --- 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 eeb069d52f3d..68c14143e50e 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;