Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2931211iog; Mon, 20 Jun 2022 07:44:20 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vMkRLFOh7e5lgx5JQF4j1BRy/CJQO6hJlUsKHrJIw4S3CvuE11hNv3D5w292WEbUHPI7/O X-Received: by 2002:a17:907:1c18:b0:711:c83b:8a14 with SMTP id nc24-20020a1709071c1800b00711c83b8a14mr20522254ejc.379.1655736260195; Mon, 20 Jun 2022 07:44:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655736260; cv=none; d=google.com; s=arc-20160816; b=rQuv/ioNnr7IZPvMJotD8Y9DBQgASazkkAL+eRftyFLY81kwg2+0Ybf80+1NzWLn6T paq7KMLRtrJNyJH6fqvIaiznVtJJZKiCTeSvJ3oslvNoUQLtwpavrfWnt891cj5mO5yP 18laVZr/HRRELl9gB++/NvZLmXBWo3usIa8DlyeV6wet/Lk5RUs6FWT0hqS0VKmolVUN jp0mHxG1HPJzINlJ8iGBzkluCec6NB10Nz1a5pvCTtBlSuQ3qkAt/BftJgMfKtssCrKY UGAdcPJWKVMLqb3LfEVtzS3m5UuGqnb9Fgsl1Jdulzctf5az8Oh1JNRGrgSEuwlCbvEE UbtQ== 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=7ovYsQdKimLCkL1Q/0dKdvn44WxzQlXLbRum/el8Gfo=; b=fnJdNYyFg+hWPY3pjs2RmLILBlSufaet3q7jenz1bDdrDKHCXAvuYHs9ZUdmtgLdSZ tFLduBsBUm51WSjkt+CJ8SXnB3PbUBQtUOTuQ8+5WaLdck6yAu506oxuLeYV/b7djV9k bZreBZob8v7qscd/MPvte20iBcUatMv14Wv5Xun4qmSQRF26GjeQd+zqZ0CDx4vJdhdE cS4ZCi7gSZBxHbMGWX4sSuZbwds7KKbA4K23SeIvyB2/hsLOx65YvGju7VDL94hebhTL ekNnHjP5RjudAkpFJEqUxHtj/HhPftKkNLT8XoMbUNCRhzUNdgu/F51tgAglXAfFum8T Bv3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Y75goWTV; 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 e6-20020a056402190600b004351fb8291fsi14272724edz.577.2022.06.20.07.43.53; Mon, 20 Jun 2022 07:44:20 -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=Y75goWTV; 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 S245615AbiFTNUw (ORCPT + 99 others); Mon, 20 Jun 2022 09:20:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245538AbiFTNO5 (ORCPT ); Mon, 20 Jun 2022 09:14:57 -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 1C454201B6; Mon, 20 Jun 2022 06:07:37 -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 783D3614B7; Mon, 20 Jun 2022 13:05:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 660CDC3411B; Mon, 20 Jun 2022 13:05:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655730350; bh=n0EDmbEOrkNOBvW/GijmfjermZbvRf0zE44tEbRt0PE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y75goWTV1IBnDGHUR95kzRIEN8f1P2m7+RvKE9CLM5LMziY67562huJVdRwz5CLUU tRsl+C1moHIT/EYqFSMT+Wq6zm8wJfmkycb+6WsVG3TMFeJnKZyQBUt0X9MWqxXgla 9SPReMbQYKCa9Yn2pjiC9q61bdejDw7f5ZtivrzI= 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 5.15 025/106] scsi: lpfc: Fix port stuck in bypassed state after LIP in PT2PT topology Date: Mon, 20 Jun 2022 14:50:44 +0200 Message-Id: <20220620124725.128905313@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220620124724.380838401@linuxfoundation.org> References: <20220620124724.380838401@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=unavailable 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 fdf5e777bf11..2bd35a7424c2 100644 --- a/drivers/scsi/lpfc/lpfc_nportdisc.c +++ b/drivers/scsi/lpfc/lpfc_nportdisc.c @@ -810,7 +810,8 @@ lpfc_rcv_logo(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, lpfc_nvmet_invalidate_host(phba, ndlp); 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