Skip to content

Commit 1cd8e75

Browse files
davejiangvinodkoul
authored andcommitted
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: 0dcfe41 ("dmanegine: idxd: cleanup all device related bits after disabling device") Reported-by: Tony Zhu <tony.zhu@intel.com> Tested-by: Tony Zhu <tony.zhu@intel.com> Signed-off-by: Dave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/164971479479.2200566.13980022473526292759.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 505a2d1 commit 1cd8e75

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/dma/idxd/device.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,9 @@ static void idxd_device_wqs_clear_state(struct idxd_device *idxd)
708708

709709
void idxd_device_clear_state(struct idxd_device *idxd)
710710
{
711+
if (!test_bit(IDXD_FLAG_CONFIGURABLE, &idxd->flags))
712+
return;
713+
711714
idxd_groups_clear_state(idxd);
712715
idxd_engines_clear_state(idxd);
713716
idxd_device_wqs_clear_state(idxd);

0 commit comments

Comments
 (0)