Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3772174pxv; Mon, 19 Jul 2021 08:23:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzp5YJONFqC3pmJ9sbJg3uaS4joM4tyJMrW7SEHgddq1manBymflp0aJVeWxMhZyL3P+bDY X-Received: by 2002:a05:6638:3181:: with SMTP id z1mr22128390jak.100.1626708222257; Mon, 19 Jul 2021 08:23:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626708222; cv=none; d=google.com; s=arc-20160816; b=eZ2fNigWs+41oNre8gZbG7TPa+yRMxxf9bDrWp7AG1orMqVacN6C3Bi889wr2R3hNF HeLmYXPqlVfdKvUBvZZkQ7pjmHSUaKjKiRJPi+jKy3U9Inum9PTO1Kx6oPVkJpoSzx/n /v0j0ComvdM4RuHjg4FtbMbQT6DIvPHPFNgjLhxjACrhirgwqAgTdnazNd1yunMKZiGQ qarGb+OenyGmiYVO3+b5Rh1o36A6VAJAij1lQpo7J1V5Eoq2pmKB9wXSIUx2VtZwzbmO rb+ZuAvfz4apC734OYQa3N33Qnwy7ilQo54yc4OIf9/x0MVasmTQX/hwdjQ/ZFYTx8F2 sbfQ== 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=ToDzH69sK8qmaaXRjGoCH0qHcrnwDzcVU/m2hBv1biM=; b=Etvsv1z9gEHFDlnAfbZ00Rkb+1vZ+xo83eK/j74SBQKRVZMenx0+r4kbbuMBNUB1qd ape1LZ16euZBCb9EUHl4JN8EqwCROsrDw2QXVXnmWMHEYbaSdG38ylAU8K+eHhFcXCqo DNJfmj6jJUHt5P5q2r5XhnIE1Ad5dm+LTgx4rAG2weYKscF+k8srKP53SlkQWvAPzdyR UC07QXKnwhb1Ri3nVdtcpjqv20dHjLFUobR6I3lbAXjicH9i47CAqv8flrOojwggr5rd Scvgnf5gke9TxNUpiIsbSTbFn8Jraz66hXfq26RgObq9Y1xA1OZBecrvget+JEaPJ9wZ IGpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dX8nIA7+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k15si21342595jad.51.2021.07.19.08.23.30; Mon, 19 Jul 2021 08:23:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dX8nIA7+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S245419AbhGSOmP (ORCPT + 99 others); Mon, 19 Jul 2021 10:42:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:46936 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243104AbhGSOa4 (ORCPT ); Mon, 19 Jul 2021 10:30:56 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4BE8461351; Mon, 19 Jul 2021 15:11:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626707495; bh=FCFDwVPsVdFB0CkRg0D4tspF1DbWBoGE2i4oPqNcN6o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dX8nIA7+ljTxE1GsSg4aGxZ5zLUdO8bOFk7tynx78CP9y+Lq+u6Z6pDJB+2V4yWaC SBIqCukuI3ZUEQoSKPEuMie+KruCYobvNRoLAqWRJJpiebRo3ex97+sAxhhRUtrTJO FOUVOuU78f4acWEuUU5xRS6PTKRyqyyljSvzuO90= 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 188/245] scsi: lpfc: Fix "Unexpected timeout" error in direct attach topology Date: Mon, 19 Jul 2021 16:52:10 +0200 Message-Id: <20210719144946.481556629@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144940.288257948@linuxfoundation.org> References: <20210719144940.288257948@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: James Smart [ Upstream commit e30d55137edef47434c40d7570276a0846fe922c ] An 'unexpected timeout' message may be seen in a point-2-point topology. The message occurs when a PLOGI is received before the driver is notified of FLOGI completion. The FLOGI completion failure causes discovery to be triggered for a second time. The discovery timer is restarted but no new discovery activity is initiated, thus the timeout message eventually appears. In point-2-point, when discovery has progressed before the FLOGI completion is processed, it is not a failure. Add code to FLOGI completion to detect that discovery has progressed and exit the FLOGI handling (noop'ing it). Link: https://lore.kernel.org/r/20210514195559.119853-4-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_els.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 7d4a5bb91606..f17adfe1326b 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -1159,6 +1159,15 @@ stop_rr_fcf_flogi: phba->fcf.fcf_redisc_attempted = 0; /* reset */ goto out; } + } else if (vport->port_state > LPFC_FLOGI && + vport->fc_flag & FC_PT2PT) { + /* + * In a p2p topology, it is possible that discovery has + * already progressed, and this completion can be ignored. + * Recheck the indicated topology. + */ + if (!sp->cmn.fPort) + goto out; } flogifail: -- 2.30.2