public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Daniel Wagner <wagi@kernel.org>, Sagi Grimberg <sagi@grimberg.me>,
	Hannes Reinecke <hare@suse.de>, Christoph Hellwig <hch@lst.de>,
	Keith Busch <kbusch@kernel.org>, Sasha Levin <sashal@kernel.org>,
	james.smart@broadcom.com, linux-nvme@lists.infradead.org
Subject: [PATCH AUTOSEL 6.1 01/11] nvme-fc: go straight to connecting state when initializing
Date: Mon, 10 Feb 2025 20:31:56 -0500	[thread overview]
Message-ID: <20250211013206.4098522-1-sashal@kernel.org> (raw)

From: Daniel Wagner <wagi@kernel.org>

[ 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 <sagi@grimberg.me>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Daniel Wagner <wagi@kernel.org>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 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 3dbf926fd99fd..2b0f15de77111 100644
--- a/drivers/nvme/host/fc.c
+++ b/drivers/nvme/host/fc.c
@@ -3525,8 +3525,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


             reply	other threads:[~2025-02-11  1:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-11  1:31 Sasha Levin [this message]
2025-02-11  1:31 ` [PATCH AUTOSEL 6.1 02/11] hrtimers: Mark is_migration_base() with __always_inline Sasha Levin
2025-02-11  1:31 ` [PATCH AUTOSEL 6.1 03/11] powercap: call put_device() on an error path in powercap_register_control_type() Sasha Levin
2025-02-11  1:31 ` [PATCH AUTOSEL 6.1 04/11] iscsi_ibft: Fix UBSAN shift-out-of-bounds warning in ibft_attr_show_nic() Sasha Levin
2025-02-11  1:32 ` [PATCH AUTOSEL 6.1 05/11] scsi: core: Use GFP_NOIO to avoid circular locking dependency Sasha Levin
2025-02-11  1:32 ` [PATCH AUTOSEL 6.1 06/11] scsi: qla1280: Fix kernel oops when debug level > 2 Sasha Levin
2025-02-11  1:32 ` [PATCH AUTOSEL 6.1 07/11] Revert "drm/amd/display: Use HW lock mgr for PSR1" Sasha Levin
2025-02-11  1:32 ` [PATCH AUTOSEL 6.1 08/11] ACPI: resource: IRQ override for Eluktronics MECH-17 Sasha Levin
2025-02-11  1:32 ` [PATCH AUTOSEL 6.1 09/11] smb: client: fix noisy when tree connecting to DFS interlink targets Sasha Levin
2025-02-11  1:32 ` [PATCH AUTOSEL 6.1 10/11] alpha/elf: Fix misc/setarch test of util-linux by removing 32bit support Sasha Levin
2025-02-11  1:32 ` [PATCH AUTOSEL 6.1 11/11] vboxsf: fix building with GCC 15 Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250211013206.4098522-1-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=james.smart@broadcom.com \
    --cc=kbusch@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    --cc=stable@vger.kernel.org \
    --cc=wagi@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox