Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2868478rwb; Mon, 15 Aug 2022 12:59:08 -0700 (PDT) X-Google-Smtp-Source: AA6agR41DaLFoVMhFvB9Lkcol2PaR/UUwUvDwbv38NiD+ahXC44CUC+lmegQq+VhLpq0yaKBJrUC X-Received: by 2002:a05:6402:5247:b0:43e:cf46:45b3 with SMTP id t7-20020a056402524700b0043ecf4645b3mr15510283edd.153.1660593548413; Mon, 15 Aug 2022 12:59:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660593548; cv=none; d=google.com; s=arc-20160816; b=BzwMoVdjQZ/4rgIJAAlwvrGdycvl/9B5eo3907/EcpjtFUe/i9U/N87DSQE68DUL++ 0uqTeCjiyjc++f/r0FTP2Cltk5cKvqxAsAhfqkdjrjsPKD4Y6XMp/1LGC1MubpIfy/Lf KzZblQOU6iCvDrHrVtlq5+caLIK7V2uCWf8BmI0Kq3KMmEvzCzODNWAhfSBYehMO5x4K iv6uIFHi5X1FJ50MYjHpxj+b+ijJJNizgsRLYMIe7ddKXYkw5p8pxxc5KhTlLT3sQ0dl C0HQpQ1Kxf7+iRHFdqZFiamUdnzjZ5mspzV6aRYdK1AQIaE2SU/9QbGkHCYpKQgvPt9Z RyAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=iYafoqj6osFL6L977xJ73cp1TlwTfV0yt8wRrJhigwM=; b=WSmyJh2Njt21MPUrWmQJvbT303um+Os/cxPS1W3tdtf9JdOwYp1as1+4kYDIgmZlBP AKete4VvrYlpbB3qFmz7uSjEtcv44jlyOnPYvLpWVYKTxIKJxVW9ps+PbEzMSdQMGjVT YmyzOdL+WOlZZkYBkxEolpWFJ3qbC0IVWNoqHYseS/JHst6zosytN0OebvSHXnTm1H7D F0IfdYolrXq1T2DQRgopYoDU2ZMz1mzxp/c7JjtwsPTyn35iGPiCnaqQkapB4k9Woi7y +KzrHU5IEZ1Dt5iLJqp5BJp/PCwsW+Cm2jyMbwa+yq8W8jWLzUzl63Oj0I/twdvvGBC2 lBeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pDP2R12R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g3-20020a1709065d0300b007317274bb0dsi9010729ejt.979.2022.08.15.12.58.42; Mon, 15 Aug 2022 12:59:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pDP2R12R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245536AbiHOTH3 (ORCPT + 99 others); Mon, 15 Aug 2022 15:07:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245707AbiHOTCi (ORCPT ); Mon, 15 Aug 2022 15:02:38 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBC8A3718D; Mon, 15 Aug 2022 11:33:50 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 57AA260F7A; Mon, 15 Aug 2022 18:33:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 600BDC433D6; Mon, 15 Aug 2022 18:33:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660588429; bh=b1vhEVSzLT806KV0vZY9uvNMldcF7FVJvXU+LO0wV90=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pDP2R12R+TLQCdb7+TbwM6YgeVwZft9KyuxLI3Bgq3b3t4460Hwif9T/7lKD2magi H7u7X9q1FIkFbvMEcjEDSC0dp1vqBPY4yD1AbyeO8LX082bJ0kOyGG7HHUN0Fwc7ji M7hEn4C15YHRAePn2fEma8mFMNGQ9Tyq+Ld2/7iM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Quinn Tran , Nilesh Javali , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 5.15 401/779] scsi: qla2xxx: edif: Fix n2n login retry for secure device Date: Mon, 15 Aug 2022 20:00:45 +0200 Message-Id: <20220815180354.412093581@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Quinn Tran [ Upstream commit aec55325ddec975216119da000092cb8664a3399 ] After initiator has burned up all login retries, target authentication application begins to run. This triggers a link bounce on target side. Initiator will attempt another login. Due to N2N, the PRLI [nvme | fcp] can fail because of the mode mismatch with target. This patch add a few more login retries to revive the connection. Link: https://lore.kernel.org/r/20220607044627.19563-11-njavali@marvell.com Fixes: 4de067e5df12 ("scsi: qla2xxx: edif: Add N2N support for EDIF") 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_init.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 2bed5050bcaf..49cfe8c9f3bb 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -2125,6 +2125,13 @@ qla24xx_handle_prli_done_event(struct scsi_qla_host *vha, struct event_arg *ea) } if (N2N_TOPO(vha->hw)) { + if (ea->fcport->n2n_link_reset_cnt == + vha->hw->login_retry_count && + ea->fcport->flags & FCF_FCSP_DEVICE) { + /* remote authentication app just started */ + ea->fcport->n2n_link_reset_cnt = 0; + } + if (ea->fcport->n2n_link_reset_cnt < vha->hw->login_retry_count) { ea->fcport->n2n_link_reset_cnt++; -- 2.35.1