From 4f5629786ceaa6912d5c585c18cc5d83fa346ea9 Mon Sep 17 00:00:00 2001 From: Max Gurtovoy Date: Tue, 10 Apr 2018 15:21:29 +0000 Subject: [PATCH 1/3] Revert "nvme: unexport nvme_start_keep_alive" This reverts commit c8799eee39e7523e5e0be10f8950b11cb66085bd. nvme_start_keep_alive() will be used by the transport drivers to fix keep-alive synchronization between NVMe-oF target/host. Signed-off-by: Max Gurtovoy --- drivers/nvme/host/core.c | 3 ++- drivers/nvme/host/nvme.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 961a5f8a44d2..46f2d85d4f31 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -1284,13 +1284,14 @@ static void nvme_keep_alive_work(struct work_struct *work) blk_execute_rq_nowait(rq, false, nvme_keep_alive_end_io); } -static void nvme_start_keep_alive(struct nvme_ctrl *ctrl) +void nvme_start_keep_alive(struct nvme_ctrl *ctrl) { if (unlikely(ctrl->kato == 0)) return; nvme_queue_keep_alive_work(ctrl); } +EXPORT_SYMBOL_GPL(nvme_start_keep_alive); void nvme_stop_keep_alive(struct nvme_ctrl *ctrl) { diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h index a162f6c6da6e..1610ec764bfc 100644 --- a/drivers/nvme/host/nvme.h +++ b/drivers/nvme/host/nvme.h @@ -729,6 +729,7 @@ int nvme_get_features(struct nvme_ctrl *dev, unsigned int fid, unsigned int dword11, void *buffer, size_t buflen, u32 *result); int nvme_set_queue_count(struct nvme_ctrl *ctrl, int *count); +void nvme_start_keep_alive(struct nvme_ctrl *ctrl); void nvme_stop_keep_alive(struct nvme_ctrl *ctrl); int nvme_reset_ctrl(struct nvme_ctrl *ctrl); int nvme_reset_ctrl_sync(struct nvme_ctrl *ctrl); -- 2.18.1