Skip to content

Commit 2d7e9c1

Browse files
igawopsiff
authored andcommitted
nvme-fc: go straight to connecting state when initializing
[ Upstream commit d3d380e ] 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> (cherry picked from commit aef373b)
1 parent abf298d commit 2d7e9c1

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

  • drivers/nvme/host

drivers/nvme/host/fc.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3553,8 +3553,7 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,
35533553
list_add_tail(&ctrl->ctrl_list, &rport->ctrl_list);
35543554
spin_unlock_irqrestore(&rport->lock, flags);
35553555

3556-
if (!nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_RESETTING) ||
3557-
!nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_CONNECTING)) {
3556+
if (!nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_CONNECTING)) {
35583557
dev_err(ctrl->ctrl.device,
35593558
"NVME-FC{%d}: failed to init ctrl state\n", ctrl->cnum);
35603559
goto fail_ctrl;

0 commit comments

Comments
 (0)