]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/nvme/host/core.c
nvme: add new reconnecting controller state
[karo-tx-linux.git] / drivers / nvme / host / core.c
index c01687d610095acaedc48a80c67f438ea2c72aa0..4babdf0d895ca0d8df8cf5e04e5f243723dfd2c5 100644 (file)
@@ -88,6 +88,7 @@ bool nvme_change_ctrl_state(struct nvme_ctrl *ctrl,
                switch (old_state) {
                case NVME_CTRL_NEW:
                case NVME_CTRL_RESETTING:
+               case NVME_CTRL_RECONNECTING:
                        changed = true;
                        /* FALLTHRU */
                default:
@@ -97,6 +98,16 @@ bool nvme_change_ctrl_state(struct nvme_ctrl *ctrl,
        case NVME_CTRL_RESETTING:
                switch (old_state) {
                case NVME_CTRL_NEW:
+               case NVME_CTRL_LIVE:
+               case NVME_CTRL_RECONNECTING:
+                       changed = true;
+                       /* FALLTHRU */
+               default:
+                       break;
+               }
+               break;
+       case NVME_CTRL_RECONNECTING:
+               switch (old_state) {
                case NVME_CTRL_LIVE:
                        changed = true;
                        /* FALLTHRU */
@@ -108,6 +119,7 @@ bool nvme_change_ctrl_state(struct nvme_ctrl *ctrl,
                switch (old_state) {
                case NVME_CTRL_LIVE:
                case NVME_CTRL_RESETTING:
+               case NVME_CTRL_RECONNECTING:
                        changed = true;
                        /* FALLTHRU */
                default: