nvme: allow controller RESETTING to RECONNECTING transition
authorJames Smart <jsmart2021@gmail.com>
Wed, 25 Oct 2017 23:43:13 +0000 (16:43 -0700)
committerChristoph Hellwig <hch@lst.de>
Wed, 1 Nov 2017 15:34:40 +0000 (16:34 +0100)
Transport will typically transition from LIVE to RESETTING when initially
performing a reset or recovering from an error.  Adding this transition
allows a transport to transition to RECONNECTING when it checks/waits for
connectivity then creates new transport connections and reinits the
controller.

Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/core.c

index 003314eb6341ad205fc505190219bded9f1376d1..07b9f4e1c283d294419da08ac5ea460795dacef7 100644 (file)
@@ -241,6 +241,7 @@ bool nvme_change_ctrl_state(struct nvme_ctrl *ctrl,
        case NVME_CTRL_RECONNECTING:
                switch (old_state) {
                case NVME_CTRL_LIVE:
+               case NVME_CTRL_RESETTING:
                        changed = true;
                        /* FALLTHRU */
                default: