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 <konrad.sztyber@intel.com>
Change-Id: Ib9fee42f6097972e8ba336958f81e1b6b1a5f006
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9310
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Konrad Sztyber 2021-08-25 16:07:20 +02:00 committed by Tomasz Zawadzki
parent 0825befa59
commit 75aa60e123

View File

@ -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);