Received: by 2002:a17:90a:9103:0:0:0:0 with SMTP id k3csp11791380pjo; Thu, 2 Jan 2020 14:20:47 -0800 (PST) X-Google-Smtp-Source: APXvYqwYsolsIvzfj0tIsqCilpQwJ1cna6+A1UaKkS7igc0zKSlHTCR1EMVmVoLyzoK1R/w2tWXE X-Received: by 2002:a9d:21f4:: with SMTP id s107mr96644733otb.102.1578003647340; Thu, 02 Jan 2020 14:20:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578003647; cv=none; d=google.com; s=arc-20160816; b=ODmSsKFdsD8Rgvr7fpXJI9wl5/hb8kJDaZNoDn4CAQ6freAHSUoc58mjOsyFlXAczU o2uNON/N7Z0SoGWmclXEbQleEIMQuuVkydcDNTQnD8t2a0eROuegplKkBTO49NRw/5FS u6g66dqYa1aV5iJfaLHK1hCoQY6u0R9AJDMWYoacPelZuMfOG6rXGa72qRa9Ym6823pR dkp7S5su80VD7/78BHplSL0/PDzTUE6Vte+Lx5/8aFsqTaS6dd8l5dcRA/i321+J6Gza iEgjIYKo/o7v1DJq7tOCka1C1PZLfN7mRc5BU6W1YG0sv8AuthNb82vnbx+5nD4GO3wU wUbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=20lIhX4Nnn7U5SqzQSmgSwBa+W4C6wjPq37x0jpetuw=; b=uGM3HRK1DJDZHSXHEhzhtC1qUVx9yM+FkB3yH4Vci9Yrn7O3IG5Fodkm/uk8GdNlgG lPeezw4ZYsE8ugfdtqbqTfbW2DvZWpUMo/BYgW/uGCXjrKZOfDCURDV13d6eD0HvWr3X 6VRG5w2pbgdL3tIlqfVrhzxELJYY7/ZRX0iTKYuFCAlSVqUPuj6I+1r1cMcHBMZnne/I 4FQoKbTgQVEvBvUN9AmgHyv/I723T+2NCKg4q0m+HwHh0nLhEEfuAR8KkRbcyaC+F7Lx mz420HEW6dfGJLMg3kO/LMd0ftagkrxnOypPNlBmTB9KRATGevKngnRlYA6Y5y8pXdte bFTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MCF89ew5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o15si29630607otp.314.2020.01.02.14.20.35; Thu, 02 Jan 2020 14:20:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MCF89ew5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728048AbgABWTA (ORCPT + 99 others); Thu, 2 Jan 2020 17:19:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:34628 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728497AbgABWS4 (ORCPT ); Thu, 2 Jan 2020 17:18:56 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B455E22314; Thu, 2 Jan 2020 22:18:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578003536; bh=EAOBqE7aU4vFwt1GRkHSNLiSPr86ybJAklPz60GXpHU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MCF89ew579GG4jEBgFDU1R8MCQGln4m3aTI6cnfj0HyDut3ZqabrrptrkvfE+Gtt/ D6RlwXjYUbMog5//s+5qsiEIilkqRfX+VDRBTUg4oSHA/Im3EdtUPf+y79tnXT9S6d 94UilAlSb+dYHkDx0kyxEZCBjXyB0vnKJInz161o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dick Kennedy , James Smart , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 4.19 010/114] scsi: lpfc: Fix SLI3 hba in loop mode not discovering devices Date: Thu, 2 Jan 2020 23:06:22 +0100 Message-Id: <20200102220030.180212003@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102220029.183913184@linuxfoundation.org> References: <20200102220029.183913184@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: James Smart [ Upstream commit feff8b3d84d3d9570f893b4d83e5eab6693d6a52 ] When operating in private loop mode, PLOGI exchanges are racing and the driver tries to abort it's PLOGI. But the PLOGI abort ends up terminating the login with the other end causing the other end to abort its PLOGI as well. Discovery never fully completes. Fix by disabling the PLOGI abort when private loop and letting the state machine play out. Link: https://lore.kernel.org/r/20191018211832.7917-5-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/lpfc/lpfc_nportdisc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c index bd8dc6a2243c..3dfed191252c 100644 --- a/drivers/scsi/lpfc/lpfc_nportdisc.c +++ b/drivers/scsi/lpfc/lpfc_nportdisc.c @@ -483,8 +483,10 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, * single discovery thread, this will cause a huge delay in * discovery. Also this will cause multiple state machines * running in parallel for this node. + * This only applies to a fabric environment. */ - if (ndlp->nlp_state == NLP_STE_PLOGI_ISSUE) { + if ((ndlp->nlp_state == NLP_STE_PLOGI_ISSUE) && + (vport->fc_flag & FC_FABRIC)) { /* software abort outstanding PLOGI */ lpfc_els_abort(phba, ndlp); } -- 2.20.1