Skip to content

Commit 863676f

Browse files
Fenghua Yuvinodkoul
authored andcommitted
dmaengine: idxd: Clear PRS disable flag when disabling IDXD device
Disabling IDXD device doesn't reset Page Request Service (PRS) disable flag to its initial value 0. This may cause user confusion because once PRS is disabled user will see PRS still remains the previous setting (i.e. disabled) via sysfs interface even after the device is disabled. To eliminate user confusion, reset PRS disable flag to ensure that the PRS flag bit reflects correct state after the device is disabled. Additionally, simplify the code by setting wq->flags to 0, which clears all flag bits, including any future additions. Fixes: f2dc327 ("dmaengine: idxd: add per wq PRS disable") Tested-by: Tony Zhu <[email protected]> Signed-off-by: Fenghua Yu <[email protected]> Reviewed-by: Dave Jiang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 8cda3ec commit 863676f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/dma/idxd/device.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -384,9 +384,7 @@ static void idxd_wq_disable_cleanup(struct idxd_wq *wq)
384384
wq->threshold = 0;
385385
wq->priority = 0;
386386
wq->enqcmds_retries = IDXD_ENQCMDS_RETRIES;
387-
clear_bit(WQ_FLAG_DEDICATED, &wq->flags);
388-
clear_bit(WQ_FLAG_BLOCK_ON_FAULT, &wq->flags);
389-
clear_bit(WQ_FLAG_ATS_DISABLE, &wq->flags);
387+
wq->flags = 0;
390388
memset(wq->name, 0, WQ_NAME_SIZE);
391389
wq->max_xfer_bytes = WQ_DEFAULT_MAX_XFER;
392390
idxd_wq_set_max_batch_size(idxd->data->type, wq, WQ_DEFAULT_MAX_BATCH);

0 commit comments

Comments
 (0)