提交 e3bfb96e 编写于 作者: D Dave Jiang 提交者: Xiaochen Shen

dmaengine: idxd: make idxd_wq_enable() return 0 if wq is already enabled

mainline inclusion
from mainline-v5.19
commit d1a28597
category: feature
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I596WO
CVE: NA

Intel-SIG: commit d1a28597 dmaengine: idxd: make idxd_wq_enable() return 0 if wq is already enabled.
Incremental backporting patches for DSA/IAA on Intel Xeon platform.

--------------------------------

When calling idxd_wq_enable() and wq is already enabled, code should return 0
and indicate function is successful instead of return error code and fail.
This should also put idxd_wq_enable() in sync with idxd_wq_disable() where
it returns 0 if wq is already disabled.
Signed-off-by: NDave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/165090980906.1378449.1939401700832432886.stgit@djiang5-desk3.ch.intel.comSigned-off-by: NVinod Koul <vkoul@kernel.org>
Signed-off-by: NXiaochen Shen <xiaochen.shen@intel.com>
上级 b67dcc70
...@@ -184,7 +184,7 @@ int idxd_wq_enable(struct idxd_wq *wq) ...@@ -184,7 +184,7 @@ int idxd_wq_enable(struct idxd_wq *wq)
if (wq->state == IDXD_WQ_ENABLED) { if (wq->state == IDXD_WQ_ENABLED) {
dev_dbg(dev, "WQ %d already enabled\n", wq->id); dev_dbg(dev, "WQ %d already enabled\n", wq->id);
return -ENXIO; return 0;
} }
idxd_cmd_exec(idxd, IDXD_CMD_ENABLE_WQ, wq->id, &status); idxd_cmd_exec(idxd, IDXD_CMD_ENABLE_WQ, wq->id, &status);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册