Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp6133301iog; Thu, 23 Jun 2022 12:03:13 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t6urTC8fhch4nq1tqKA7Rt+R2RXoTRA3EPhJZ3bLF3zShX2ugroAWIZyTI4HKZqzRW4FHW X-Received: by 2002:a17:906:5256:b0:711:ee4d:fbe4 with SMTP id y22-20020a170906525600b00711ee4dfbe4mr9219950ejm.312.1656010993146; Thu, 23 Jun 2022 12:03:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656010993; cv=none; d=google.com; s=arc-20160816; b=sakluJgen8B/LjDAvMDWHbIhF0lEJd5kabFjzQXaYRboTjuDTBu0GITwuQhx7oGQjx zuBzsMHhgFbE5h/9SpF4kOpeVxLNe2qoa62gxJbiJpXfBiLNRQTYMIYpWdAizkcYAH8S SpfGtzW5h6LCSPkCR5A9dOTQ3cGDJKerDwaecTfxChUBOGmMxE1sSPmDvTjF1zcdtAsr AbK3C+2qY2SqDh9LoTADiJD24tu0e0NHVvmcjQz6jisWzQEn7hblgw11UewF709I3q5u vKaKdlqkDlQMj9eRY/UExnhomMwbkOBhVvNSk82i378+uX5wWWyk+pMo9DKfTlfh3JEc 8DWw== 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=R/t/ZFyOXcArZhBiyfQKQlX5ffTeUc09ZpZXYAD5t2E=; b=DuVlVJrBGclJL0GwZ6MFjOqCCP1Y+iSIjE7bCLj7APFYCcy9p6osXrqEWxMFs2MNLv mcBVrC7qKPstzSDGCwJjJJ3sfobeMSIS+8nwG6vg6x+F1b7SEyYa3ArBPOSbQNFKFKbZ XdcDqaNpf079WsjdrFVHnJt6z3BpGoF70Pwvj4zLPpFMCjYLucowmPRGtjOwzWfzXgYP IYAQEcLAnmiiCu7eKahnT2il4RmRX+B5m9EojLUs5wnNvOJIlc6wHLigmIWRX3DnFObu 9r9LQkfAQZKl9gAaUPSf5S9eqR1NqkYQLKfi389oCDzB8FHaTMwa+kyOtZUBJRLMZM30 631Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=BTS952vm; 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 hp40-20020a1709073e2800b0071200c979b1si1477992ejc.644.2022.06.23.12.02.47; Thu, 23 Jun 2022 12:03:13 -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=BTS952vm; 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 S236750AbiFWSQO (ORCPT + 99 others); Thu, 23 Jun 2022 14:16:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236633AbiFWSPj (ORCPT ); Thu, 23 Jun 2022 14:15:39 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 272178289C; Thu, 23 Jun 2022 10:21:58 -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 ams.source.kernel.org (Postfix) with ESMTPS id D99A0B824BD; Thu, 23 Jun 2022 17:21:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 279E2C3411B; Thu, 23 Jun 2022 17:21:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656004915; bh=iw50gbSjabpucUX0/rYmkGKA6LdGRAt/18oM3zoVtzQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BTS952vmhrA2NaAzfGbW8JMfNddprFecWJO4i4VVbGWNwtNpOrIAJAjZ9dZRvTdCF uM+TJxzcYjbEQFh4Ro6WcmDZnkb6GS775YTthdXKf2IEMOdbbdiOhGY0p17+J96L4y JnGp0D1zJpKED4kzAO9KrG8PS7h9ObUnSgxu26wI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Justin Tee , James Smart , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 4.19 191/234] scsi: lpfc: Fix port stuck in bypassed state after LIP in PT2PT topology Date: Thu, 23 Jun 2022 18:44:18 +0200 Message-Id: <20220623164348.452907586@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220623164343.042598055@linuxfoundation.org> References: <20220623164343.042598055@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 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: James Smart [ Upstream commit 336d63615466b4c06b9401c987813fd19bdde39b ] After issuing a LIP, a specific target vendor does not ACC the FLOGI that lpfc sends. However, it does send its own FLOGI that lpfc ACCs. The target then establishes the port IDs by sending a PLOGI. lpfc PLOGI_ACCs and starts the RPI registration for DID 0x000001. The target then sends a LOGO to the fabric DID. lpfc is currently treating the LOGO from the fabric DID as a link down and cleans up all the ndlps. The ndlp for DID 0x000001 is put back into NPR and discovery stops, leaving the port in stuck in bypassed mode. Change lpfc behavior such that if a LOGO is received for the fabric DID in PT2PT topology skip the lpfc_linkdown_port() routine and just move the fabric DID back to NPR. Link: https://lore.kernel.org/r/20220603174329.63777-7-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/lpfc/lpfc_nportdisc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c index 9442fb30e7cd..f666518d84b0 100644 --- a/drivers/scsi/lpfc/lpfc_nportdisc.c +++ b/drivers/scsi/lpfc/lpfc_nportdisc.c @@ -662,7 +662,8 @@ lpfc_rcv_logo(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, else lpfc_els_rsp_acc(vport, ELS_CMD_ACC, cmdiocb, ndlp, NULL); if (ndlp->nlp_DID == Fabric_DID) { - if (vport->port_state <= LPFC_FDISC) + if (vport->port_state <= LPFC_FDISC || + vport->fc_flag & FC_PT2PT) goto out; lpfc_linkdown_port(vport); spin_lock_irq(shost->host_lock); -- 2.35.1