From e8fc521f7d4db54872504669a6f3e35726421fff Mon Sep 17 00:00:00 2001 From: paul luse Date: Mon, 3 May 2021 18:25:11 -0400 Subject: [PATCH] lib/idxd: set error status on any completion error. Not just one with extra available info. Also remove the extra read of the error register, not required. fixes: #1927 Signed-off-by: paul luse Change-Id: I28badb45d8cc8d16b72f7019bd2a2044998fc402 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7729 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Ziye Yang Reviewed-by: Krzysztof Karas Reviewed-by: Tomasz Zawadzki --- lib/idxd/idxd.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/idxd/idxd.c b/lib/idxd/idxd.c index 5e1fbe1bad..dbe9251795 100644 --- a/lib/idxd/idxd.c +++ b/lib/idxd/idxd.c @@ -1023,7 +1023,6 @@ int spdk_idxd_process_events(struct spdk_idxd_io_channel *chan) { struct idxd_comp *comp_ctx, *tmp; - uint64_t sw_error_0; int status = 0; int rc = 0; @@ -1034,11 +1033,8 @@ spdk_idxd_process_events(struct spdk_idxd_io_channel *chan) rc++; if (spdk_unlikely(IDXD_FAILURE(comp_ctx->hw.status))) { - sw_error_0 = idxd_read_8(chan->idxd, chan->portal, IDXD_SWERR_OFFSET); - if (IDXD_SW_ERROR(sw_error_0)) { - _dump_error_reg(chan); - status = -EINVAL; - } + status = -EINVAL; + _dump_error_reg(chan); } switch (comp_ctx->desc->opcode) {