From 0258728f2baa795e438229565eb7e103ad56dceb Mon Sep 17 00:00:00 2001 From: Darek Stojaczyk Date: Mon, 15 Oct 2018 06:56:23 +0200 Subject: [PATCH] nvme/pci: increase the init delay to 2s The time required to wait increases with the amount of submitted FLR resets. Now that DPDK takes less and less time to initialize, this starts to become an issue. We can even see on our CI within regular tests where a single application is start-stopped in a short period of time. This is also a problem if a device is detached via RPC and immediately attached afterwards. The time required to wait seems to cap at 2 seconds, so instruct our driver to wait exactly that. Change-Id: I18b6fbdea9b0dca5d7e1756e9ead7d97119f2fa2 Signed-off-by: Darek Stojaczyk Reviewed-on: https://review.gerrithub.io/429415 Chandler-Test-Pool: SPDK Automated Test System Reviewed-by: Jim Harris Reviewed-by: Ben Walker Tested-by: SPDK CI Jenkins --- lib/nvme/nvme_ctrlr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/nvme/nvme_ctrlr.c b/lib/nvme/nvme_ctrlr.c index 129d5f29a..69ae08783 100644 --- a/lib/nvme/nvme_ctrlr.c +++ b/lib/nvme/nvme_ctrlr.c @@ -1883,8 +1883,8 @@ nvme_ctrlr_process_init(struct spdk_nvme_ctrlr *ctrlr) * * TODO: Figure out what is actually going wrong. */ - SPDK_DEBUGLOG(SPDK_LOG_NVME, "Adding 500 ms delay before initializing the controller\n"); - ctrlr->sleep_timeout_tsc = spdk_get_ticks() + (500 * spdk_get_ticks_hz() / 1000); + SPDK_DEBUGLOG(SPDK_LOG_NVME, "Adding 2 second delay before initializing the controller\n"); + ctrlr->sleep_timeout_tsc = spdk_get_ticks() + (2000 * spdk_get_ticks_hz() / 1000); break; case NVME_CTRLR_STATE_INIT: