From 14d2324805f367a742ac5a667d60c0eaa075ecf8 Mon Sep 17 00:00:00 2001 From: Changpeng Liu Date: Mon, 29 Jul 2019 03:43:54 -0400 Subject: [PATCH] examples/nvme/identify: only print arbitration information if the drive can support WRR arbitration Some drives can return get features with Arbitration feature ID successfully even the drive can't support this feature, so we will not print this information for the drives which can't support this feature. Change-Id: Ife8a40120de7adcacd99d8513cfbcae1c15330dd Signed-off-by: Changpeng Liu Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463481 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Ben Walker --- examples/nvme/identify/identify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/nvme/identify/identify.c b/examples/nvme/identify/identify.c index 8c70bafc7..38ec529f1 100644 --- a/examples/nvme/identify/identify.c +++ b/examples/nvme/identify/identify.c @@ -1248,7 +1248,7 @@ print_controller(struct spdk_nvme_ctrlr *ctrlr, const struct spdk_nvme_transport } printf("\n"); - if (features[SPDK_NVME_FEAT_ARBITRATION].valid) { + if (features[SPDK_NVME_FEAT_ARBITRATION].valid && (cap.bits.ams & SPDK_NVME_CAP_AMS_WRR)) { uint32_t arb = features[SPDK_NVME_FEAT_ARBITRATION].result; unsigned ab, lpw, mpw, hpw;