summaryrefslogtreecommitdiffstats
path: root/drivers/nvme/target/core.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2018-07-04 02:27:12 +0200
committerDave Airlie <airlied@redhat.com>2018-07-04 02:27:12 +0200
commitf29135ee4e0d4e01911ed569f731bfdb841cea6d (patch)
treee72d49a2f677dd069c3a673522cf785548148f71 /drivers/nvme/target/core.c
parentMerge tag 'drm-misc-next-2018-06-27' of git://anongit.freedesktop.org/drm/drm... (diff)
parentLinux 4.18-rc3 (diff)
downloadlinux-f29135ee4e0d4e01911ed569f731bfdb841cea6d.tar.xz
linux-f29135ee4e0d4e01911ed569f731bfdb841cea6d.zip
Merge v4.18-rc3 into drm-next
Two requests have come in for a backmerge, and I've got some pull reqs on rc2, so this just makes sense. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/nvme/target/core.c')
-rw-r--r--drivers/nvme/target/core.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
index a03da764ecae..74d4b785d2da 100644
--- a/drivers/nvme/target/core.c
+++ b/drivers/nvme/target/core.c
@@ -686,6 +686,14 @@ static void nvmet_start_ctrl(struct nvmet_ctrl *ctrl)
}
ctrl->csts = NVME_CSTS_RDY;
+
+ /*
+ * Controllers that are not yet enabled should not really enforce the
+ * keep alive timeout, but we still want to track a timeout and cleanup
+ * in case a host died before it enabled the controller. Hence, simply
+ * reset the keep alive timer when the controller is enabled.
+ */
+ mod_delayed_work(system_wq, &ctrl->ka_work, ctrl->kato * HZ);
}
static void nvmet_clear_ctrl(struct nvmet_ctrl *ctrl)