Message ID | 20230811012635.535413-2-fenghua.yu@intel.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 8cae66574398326134a41513b419e00ad4e380ca |
Headers | show |
Series | [1/2] dmaengine: idxd: Allow ATS disable update only for configurable devices | expand |
diff --git a/drivers/dma/idxd/sysfs.c b/drivers/dma/idxd/sysfs.c index 66c89b07b3f7..a5c3eb434832 100644 --- a/drivers/dma/idxd/sysfs.c +++ b/drivers/dma/idxd/sysfs.c @@ -1131,8 +1131,8 @@ static ssize_t wq_prs_disable_store(struct device *dev, struct device_attribute if (wq->state != IDXD_WQ_DISABLED) return -EPERM; - if (!idxd->hw.wq_cap.wq_prs_support) - return -EOPNOTSUPP; + if (!test_bit(IDXD_FLAG_CONFIGURABLE, &idxd->flags)) + return -EPERM; rc = kstrtobool(buf, &prs_dis); if (rc < 0)