From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 294BB227EBD; Tue, 8 Apr 2025 10:55:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744109702; cv=none; b=PLaRj6/XA1+qnHbIWoPJte6kew+foQfgpiuZXeMgBenRWoKN6dq4+niw9iJEb5xjQBeVPkA75p/Ut8nGzpM1DenqQGcsTtuhLHuxsJCe0IL9anqU0b/856bbG1QcUgWBWJyyDeLkEdonVx98020KS4dnfa19T1XssPYslOquYZU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744109702; c=relaxed/simple; bh=/Juwqdk+TLQcwBIzc7a0YbbBuFBTOhORg2iVqUqnSrs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WznemfJIdnbhlANGARdsFPEOeM8QSexoHYaNmhXDDzu3J/pfT82AiOcg0nxTzOeiboOprXB7VDGB/GOqmVz8JH0jX69n6EiJ1+mCfSDiaUgKxz3dBV8IB4ZNS0VxwHVQmMTmrvRgrDXbyH5BT60ItgfpMvVk3oCD5SeB1iIRdxo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=s9uxFXih; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="s9uxFXih" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1E839C4CEE5; Tue, 8 Apr 2025 10:55:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1744109701; bh=/Juwqdk+TLQcwBIzc7a0YbbBuFBTOhORg2iVqUqnSrs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s9uxFXihorSLjPMRAwPNo9ucHVOT8GFOYk9D+J4g70/GPYoRozAmD7gHARpYl5Vqq WPtsoFePdMmPsLcdSO+o6ew/UOrQF2fUPo+4rk3m43Eh9chZvUKtwP4x6Q2F+PN9gd umNJYV8eBkHd5mCuY7TE13u6qz0FNsO1a7RYnL9g= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Sagi Grimberg , Hannes Reinecke , Christoph Hellwig , Daniel Wagner , Keith Busch , Sasha Levin Subject: [PATCH 5.10 021/227] nvme-fc: go straight to connecting state when initializing Date: Tue, 8 Apr 2025 12:46:39 +0200 Message-ID: <20250408104821.030643441@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250408104820.353768086@linuxfoundation.org> References: <20250408104820.353768086@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Daniel Wagner [ Upstream commit d3d380eded7ee5fc2fc53b3b0e72365ded025c4a ] The initial controller initialization mimiks the reconnect loop behavior by switching from NEW to RESETTING and then to CONNECTING. The transition from NEW to CONNECTING is a valid transition, so there is no point entering the RESETTING state. TCP and RDMA also transition directly to CONNECTING state. Reviewed-by: Sagi Grimberg Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Daniel Wagner Signed-off-by: Keith Busch Signed-off-by: Sasha Levin --- drivers/nvme/host/fc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c index 8e05239073ef2..f49e98c2e31db 100644 --- a/drivers/nvme/host/fc.c +++ b/drivers/nvme/host/fc.c @@ -3536,8 +3536,7 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts, list_add_tail(&ctrl->ctrl_list, &rport->ctrl_list); spin_unlock_irqrestore(&rport->lock, flags); - if (!nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_RESETTING) || - !nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_CONNECTING)) { + if (!nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_CONNECTING)) { dev_err(ctrl->ctrl.device, "NVME-FC{%d}: failed to init ctrl state\n", ctrl->cnum); goto fail_ctrl; -- 2.39.5