From 2077fbd7e4890909c02319badbe6d5cb8cc50acb Mon Sep 17 00:00:00 2001 From: Igor Konopko Date: Thu, 13 Dec 2018 15:32:58 +0100 Subject: [PATCH] nvme: do not fail init when Intel log pages are not supported Currently for all the Intel drives nvme driver tries to add Intel VS log pages support. When this log pages are not supported whole init process fails. This patch changes this behaviour by allowing to init Intel drives which rejects VS log pages. This is valid scenario for drives which are in states other than healthy. Such a drives are still accesible via admin queue, but does not expose some of the features, such as this particular VS log pages. Change-Id: I3764f2d67fd7153b6b1889273a9fedeb9c4213d3 Signed-off-by: Igor Konopko Reviewed-on: https://review.gerrithub.io/c/437162 Tested-by: SPDK CI Jenkins Chandler-Test-Pool: SPDK Automated Test System Reviewed-by: Jim Harris Reviewed-by: Darek Stojaczyk Reviewed-by: Ben Walker Reviewed-by: Changpeng Liu --- 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 9b34c7862..b404c7f4e 100644 --- a/lib/nvme/nvme_ctrlr.c +++ b/lib/nvme/nvme_ctrlr.c @@ -405,8 +405,8 @@ static int nvme_ctrlr_set_intel_support_log_pages(struct spdk_nvme_ctrlr *ctrlr) if (spdk_nvme_wait_for_completion(ctrlr->adminq, &status)) { spdk_free(log_page_directory); - SPDK_ERRLOG("nvme_ctrlr_cmd_get_log_page failed!\n"); - return -ENXIO; + SPDK_WARNLOG("Intel log pages not supported on Intel drive!\n"); + return 0; } nvme_ctrlr_construct_intel_support_log_page_list(ctrlr, log_page_directory);