From 09c0c9764a887e40f250f6d73a7153b238e264c0 Mon Sep 17 00:00:00 2001 From: Changpeng Liu Date: Mon, 26 Jul 2021 20:14:36 +0800 Subject: [PATCH] nvmf: return feature not changeable for Interrupt Coalescing feature Windows will always sends a Set Feature Interrupt Coalescing even SPDK reports we can't support it in Get Feature command. Here we return Feature Not Changeable instead of Invalid Field which is more meaningful. Change-Id: Ie08086c3eba1e2d790a7ae4976653b6f9085028c Signed-off-by: Changpeng Liu Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8923 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Aleksey Marchuk Reviewed-by: Jim Harris --- lib/nvmf/ctrlr.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/nvmf/ctrlr.c b/lib/nvmf/ctrlr.c index 529b8b901..2e9372ebe 100644 --- a/lib/nvmf/ctrlr.c +++ b/lib/nvmf/ctrlr.c @@ -2912,6 +2912,10 @@ nvmf_ctrlr_set_features(struct spdk_nvmf_request *req) return nvmf_ctrlr_set_features_volatile_write_cache(req); case SPDK_NVME_FEAT_NUMBER_OF_QUEUES: return nvmf_ctrlr_set_features_number_of_queues(req); + case SPDK_NVME_FEAT_INTERRUPT_COALESCING: + response->status.sct = SPDK_NVME_SCT_COMMAND_SPECIFIC; + response->status.sc = SPDK_NVME_SC_FEATURE_NOT_CHANGEABLE; + return SPDK_NVMF_REQUEST_EXEC_STATUS_COMPLETE; case SPDK_NVME_FEAT_WRITE_ATOMICITY: return nvmf_ctrlr_set_features_write_atomicity(req); case SPDK_NVME_FEAT_ASYNC_EVENT_CONFIGURATION: