Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1146523pxv; Fri, 9 Jul 2021 19:29:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhgJBFteHhjh51w78s/oVLq2h+dZz66PpbGvPPZrfHqj2rne7ZU19FHYQDzIodmRSmZ2Um X-Received: by 2002:a17:906:af91:: with SMTP id mj17mr5553437ejb.76.1625884181581; Fri, 09 Jul 2021 19:29:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625884181; cv=none; d=google.com; s=arc-20160816; b=Q2lJ14BDyeRJgndqyR1UoAzZvEEPyuz8bUbRTTJmbK9TA1nGZUnxgWwqq+VbeQwMCc rs9xv6xi8/jpfK4hXXd8f+CXFs7rG6o52TZtKO2JF6WhAoDH/fnOeEi6AidnvVsHQuG2 I/Mk93deCwQE/ZnKkiCz5OqHrdpNai3+14z8Khg8opRJz5Vir4g7Kyj4tHhT1kNfQoan XU7dF1z2e8UXoqF+fmlAdGiCyNRCc5IDe4yROOtVfPM7fBotNqNTrJiJDftxAqjrCOwq 6TKGOPWNXs7BjJ8GsL0cEDFRbqof1ZwQXEbwFMjCJMkOpf8sicx6NgZdWIST70o1D8GF 55og== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0ClDM9DOcRFQ6qDdV9Vy1EAHwI5fVH19ZvAUo9SEQUs=; b=VR5u1pMeAkPleJCzVYBIWjFMXsDzKpF4Qme2ZRs4g32kWGQR6OnPvjGhFHCFM9EYQ6 U5jwzwzRJwp2UDjd58CmS0S51BvUmXOOx58NP0O9/NmREcxn4KIwvyk1zh2rX4aHnvqS Dnjh2XX7CqGhNXIyQ0r7miAOmliZ8D4QVxPkVKgI2HmeM5vQCHWIjBYa7sOrya9/CwdY UIhtaGlRo7VQOA5w2pON53RzoxP7kfYwlS7+DiZ0gVKMjd7m/o3xy2bOtVpWD55R1xkM GngwSk+1sieuYPilPL0BiHF5oVNrBUqZDvWGvF4BdpgB/0tpxwppZZDCro7cpnN6CNO5 BJ0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=N8qrUnpP; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nd1si8749599ejc.631.2021.07.09.19.29.18; Fri, 09 Jul 2021 19:29:41 -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=@kernel.org header.s=k20201202 header.b=N8qrUnpP; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234420AbhGJCbD (ORCPT + 99 others); Fri, 9 Jul 2021 22:31:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:42484 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233823AbhGJC2J (ORCPT ); Fri, 9 Jul 2021 22:28:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 682EA613F8; Sat, 10 Jul 2021 02:25:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625883902; bh=uK5C2xUh0kNMmqbDaAw/tdtxHQe6wKGE5gUanvCTDYc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N8qrUnpPSCw1c+Oqbzc+dezTsfINOn19p3EAnitbrf/NKQS9RGAkFHFb6eteyWyaG x18wr/0bD3vFgu2e0u5bn39FyjDJxuDt5npUhOah+5pfTPJv0nokMzuXL34AhhdsLw q8EACZpAclOmjo2TelCqdO5ZSw1cuL3j881LlkVx5jc8VHyvWJwh/Hz6McMnNGFbYS HLUlfjdVMjxN8wIt19PbHv1uawbKJx7rurgRtiJIYjQ7BKJeqcQtH3ntVrpAHzMg/X AKLjuPqVmP3kEmAWrtx0vXx34a7BgFYyho82bXiJdWfS66FTAPPL8njrLAmQrBfvAB 0Ldr2fGJ+dWfw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: James Smart , Justin Tee , "Martin K . Petersen" , Sasha Levin , linux-scsi@vger.kernel.org Subject: [PATCH AUTOSEL 5.10 25/93] scsi: lpfc: Fix "Unexpected timeout" error in direct attach topology Date: Fri, 9 Jul 2021 22:23:19 -0400 Message-Id: <20210710022428.3169839-25-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210710022428.3169839-1-sashal@kernel.org> References: <20210710022428.3169839-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore 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 b60945182db8..3d9889b3d5c8 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -1179,6 +1179,15 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, 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