From patchwork Wed Nov 20 22:27:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Bolshakov X-Patchwork-Id: 11254945 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 09CCE14DB for ; Wed, 20 Nov 2019 22:27:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DE8B820857 for ; Wed, 20 Nov 2019 22:27:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=yadro.com header.i=@yadro.com header.b="dhXhkrDV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726703AbfKTW1m (ORCPT ); Wed, 20 Nov 2019 17:27:42 -0500 Received: from mta-02.yadro.com ([89.207.88.252]:51252 "EHLO mta-01.yadro.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726574AbfKTW1l (ORCPT ); Wed, 20 Nov 2019 17:27:41 -0500 Received: from localhost (unknown [127.0.0.1]) by mta-01.yadro.com (Postfix) with ESMTP id F3D1943D79; Wed, 20 Nov 2019 22:27:39 +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= 1574288859; x=1576103260; bh=rSnJTzuxkzVlpvhu14/MVeJvHTaJrfQHCMa qfaTBCio=; b=dhXhkrDVyza3x43c9hphqqOxb4z4TtdcVkHGt/iRAjLwJRTtJW+ IBEr4N0S5jQLtZJ8H2V7LkvkV0kXB8oGvP2INiNiCo/bo781iglWqxCNxlfwiKZP erGf67QEkbEZFQsHKU+l208CmPsiq82WKZDRiI8U/oaJeneapTw7TLvk= 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 jHdJxb6qvwOL; Thu, 21 Nov 2019 01:27:39 +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 3597F42F13; Thu, 21 Nov 2019 01:27:36 +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; Thu, 21 Nov 2019 01:27:35 +0300 From: Roman Bolshakov To: , CC: , Roman Bolshakov , Quinn Tran , Himanshu Madhani , Krishna Kant , Alexei Potashnik Subject: [PATCH v2 09/15] scsi: qla2xxx: Send Notify ACK after N2N PLOGI Date: Thu, 21 Nov 2019 01:27:17 +0300 Message-ID: <20191120222723.27779-10-r.bolshakov@yadro.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191120222723.27779-1-r.bolshakov@yadro.com> References: <20191120222723.27779-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: Quinn Tran Cc: Himanshu Madhani Cc: Krishna Kant Cc: Alexei Potashnik Signed-off-by: Roman Bolshakov Acked-by: Quinn Tran Signed-off-by: Roman Bolshakov Acked-by: Himanshu Madhani --- 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 ab62fcba8ab3..853fa187d827 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -4802,6 +4802,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;