Skip to content

Commit d3d380e

Browse files
igawkeithbusch
authored andcommitted
nvme-fc: go straight to connecting state when initializing
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>
1 parent 11cb352 commit d3d380e

File tree

1 file changed

+1
-2
lines changed
  • drivers/nvme/host

1 file changed

+1
-2
lines changed

drivers/nvme/host/fc.c

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

3581-
if (!nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_RESETTING) ||
3582-
!nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_CONNECTING)) {
3581+
if (!nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_CONNECTING)) {
35833582
dev_err(ctrl->ctrl.device,
35843583
"NVME-FC{%d}: failed to init ctrl state\n", ctrl->cnum);
35853584
goto fail_ctrl;

0 commit comments

Comments
 (0)