Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp6135256iog; Thu, 23 Jun 2022 12:05:11 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s2C/eay+AsQpDN4Ut7GGSRADQoCTYSg8R3HrKQCL3p7+kG0zfd3WydlS85HubVpHG7vHK6 X-Received: by 2002:a17:906:7493:b0:722:df76:319d with SMTP id e19-20020a170906749300b00722df76319dmr9574728ejl.588.1656011111480; Thu, 23 Jun 2022 12:05:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656011111; cv=none; d=google.com; s=arc-20160816; b=nOW0s7LDDmSmEKXppJeYYgkEHlNeSo+GdxVE/J+n+6X7JjSwUfThBgBhcjpeyvW9S4 V9P57oHU67MCsdEbvC899uA3kqbvJBgMQDd0nTbgmQcgpxuEs4xzO/W5cShpqnlz/qQg SQVU5gW5rM1+rBP2rE6cNR1LKrDQqjK3XtZhnDlcQWh9EAH3fAexNBicTd5oe8w6YAAr M4DxQHrCot89zz8ffcu8COS20sLmPawQ2RuFxWrzuUBI6KZbGcqUbOd4ZJ/cxS1rLMWR WrlWd3XTpClJlUvBvg01vrPRQGRVTGRhrD+Aw3dWaE/A5s9U8823mwrYfPM3l4a3Qmos 4Mwg== 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=nqPFbWrKV269oUyP2B+zhjsIPN9W2MzIhmNfNhNBUoQ=; b=UfPikX6FHU0klw4dnu7X+OO4iHfefbblpegT74BlQePjClJirKGf28ZSh3gE8HFoUT MctPGCJ0T/Un9U978BGh9ajHOYL2a0aFyHHvSZ+ZPhHyXoZGfCBtK04F7cnmCizX8fvA hr4vcUQBwPSrMARRNZ8j1uuhFv3oVa4c+76riTzOaw1TrAklQd90txMuU1j4CDKYWT/3 CLuViEZXRCtNNgyxInR9qfr3ycvDF9EPwskara8UDKCRC5ZWs8/zw2+0T60wveoHy+pn bDgtJ5t7M7uKjSztlrTGNHnI7fH9i3wxw26UN3UGykOwWDmShhxGeu+U33Nd6a21V6q/ OI3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0hRosiJ+; 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 b15-20020a056402350f00b004357f76325dsi392556edd.294.2022.06.23.12.04.45; Thu, 23 Jun 2022 12:05:11 -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=0hRosiJ+; 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 S231656AbiFWRKw (ORCPT + 99 others); Thu, 23 Jun 2022 13:10:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233844AbiFWRIS (ORCPT ); Thu, 23 Jun 2022 13:08:18 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D143653A77; Thu, 23 Jun 2022 09:56:57 -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 6F08060AE6; Thu, 23 Jun 2022 16:56:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 62360C3411B; Thu, 23 Jun 2022 16:56:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656003415; bh=yoO8pOvSuOKKaQGSmbkH7dUaUIqXiF2xgtYk0n1/exQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0hRosiJ+0y8HlRTq6IJZztd+7WTKYNzZbR2GCnU+pftcnuvEyrphpwuT8bwe5JY2c l2PYNuwugbuQUDYnlK8SUpQ2D5EwTN6TwCT3Gn91uWplaW1vZm1HWKhXsLTqB3vvCQ 029mRROEKwZD/3jjVRnS5XjkWbaLyV14hiLLcOAs= 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.9 232/264] scsi: lpfc: Fix port stuck in bypassed state after LIP in PT2PT topology Date: Thu, 23 Jun 2022 18:43:45 +0200 Message-Id: <20220623164350.642507603@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220623164344.053938039@linuxfoundation.org> References: <20220623164344.053938039@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 30b5f65b29d1..7f230d0b2fd6 100644 --- a/drivers/scsi/lpfc/lpfc_nportdisc.c +++ b/drivers/scsi/lpfc/lpfc_nportdisc.c @@ -633,7 +633,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