From b0de620cfca9f74f7cb017b7fd2fc8da4fc196f6 Mon Sep 17 00:00:00 2001 From: Konrad Sztyber Date: Wed, 25 Aug 2021 16:07:20 +0200 Subject: [PATCH] nvme: disable keep-alive during controller reset When a controller is reset, it goes through the whole init process, including establishing keep-alive, so there's no point in sending it during that time. Additionally, it can stall the initialization if it gets queued when adminq is connecting. Signed-off-by: Konrad Sztyber Change-Id: Ib9fee42f6097972e8ba336958f81e1b6b1a5f006 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9310 Community-CI: Mellanox Build Bot Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins Reviewed-by: Aleksey Marchuk Reviewed-by: Jim Harris --- lib/nvme/nvme_ctrlr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/nvme/nvme_ctrlr.c b/lib/nvme/nvme_ctrlr.c index c40ab74fe..b5042e74c 100644 --- a/lib/nvme/nvme_ctrlr.c +++ b/lib/nvme/nvme_ctrlr.c @@ -1545,6 +1545,9 @@ nvme_ctrlr_reset_pre(struct spdk_nvme_ctrlr *ctrlr) NVME_CTRLR_NOTICELOG(ctrlr, "resetting controller\n"); + /* Disable keep-alive, it'll be re-enabled as part of the init process */ + ctrlr->keep_alive_interval_ticks = 0; + /* Abort all of the queued abort requests */ nvme_ctrlr_abort_queued_aborts(ctrlr);