From c322453cccc4d3150de779b8da5616fd19188442 Mon Sep 17 00:00:00 2001 From: Jacek Kalwas Date: Tue, 21 Jul 2020 19:08:41 +0200 Subject: [PATCH] nvmf: disable keep alive timer during shutdown From the time a shutdown is initiated the controller shall disable Keep Alive timer. Signed-off-by: Jacek Kalwas Change-Id: Id499dabce1913b9da2f0b3fd961fdfc8b621afa9 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3462 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Ben Walker Reviewed-by: Changpeng Liu --- lib/nvmf/ctrlr.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/nvmf/ctrlr.c b/lib/nvmf/ctrlr.c index aaf15fccf..27145105d 100644 --- a/lib/nvmf/ctrlr.c +++ b/lib/nvmf/ctrlr.c @@ -860,6 +860,10 @@ nvmf_prop_set_cc(struct spdk_nvmf_ctrlr *ctrlr, uint32_t value) nvmf_ctrlr_disconnect_io_qpairs_on_pg, ctrlr, nvmf_ctrlr_cc_shn_done); + + /* From the time a shutdown is initiated the controller shall disable + * Keep Alive timer */ + nvmf_ctrlr_stop_keep_alive_timer(ctrlr); } else if (cc.bits.shn == 0) { ctrlr->vcprop.cc.bits.shn = 0; } else {