Commit 1cd8e751 authored by Dave Jiang's avatar Dave Jiang Committed by Vinod Koul

dmaengine: idxd: skip clearing device context when device is read-only

If the device shows up as read-only configuration, skip the clearing of the
state as the context must be preserved for device re-enable after being
disabled.

Fixes: 0dcfe41e ("dmanegine: idxd: cleanup all device related bits after disabling device")
Reported-by: default avatarTony Zhu <tony.zhu@intel.com>
Tested-by: default avatarTony Zhu <tony.zhu@intel.com>
Signed-off-by: default avatarDave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/164971479479.2200566.13980022473526292759.stgit@djiang5-desk3.ch.intel.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 505a2d10
...@@ -708,6 +708,9 @@ static void idxd_device_wqs_clear_state(struct idxd_device *idxd) ...@@ -708,6 +708,9 @@ static void idxd_device_wqs_clear_state(struct idxd_device *idxd)
void idxd_device_clear_state(struct idxd_device *idxd) void idxd_device_clear_state(struct idxd_device *idxd)
{ {
if (!test_bit(IDXD_FLAG_CONFIGURABLE, &idxd->flags))
return;
idxd_groups_clear_state(idxd); idxd_groups_clear_state(idxd);
idxd_engines_clear_state(idxd); idxd_engines_clear_state(idxd);
idxd_device_wqs_clear_state(idxd); idxd_device_wqs_clear_state(idxd);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment