Skip to content

Commit d2fe192

Browse files
igawkeithbusch
authored andcommitted
nvme: only allow entering LIVE from CONNECTING state
The fabric transports and also the PCI transport are not entering the LIVE state from NEW or RESETTING. This makes the state machine more restrictive and allows to catch not supported state transitions, e.g. directly switching from RESETTING to LIVE. Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Daniel Wagner <wagi@kernel.org> Signed-off-by: Keith Busch <kbusch@kernel.org>
1 parent f13409b commit d2fe192

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/nvme/host/core.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,8 +564,6 @@ bool nvme_change_ctrl_state(struct nvme_ctrl *ctrl,
564564
switch (new_state) {
565565
case NVME_CTRL_LIVE:
566566
switch (old_state) {
567-
case NVME_CTRL_NEW:
568-
case NVME_CTRL_RESETTING:
569567
case NVME_CTRL_CONNECTING:
570568
changed = true;
571569
fallthrough;

0 commit comments

Comments
 (0)