projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a1fcaf0
)
dmaengine: idxd: remove global token limit check
author
Dave Jiang
<dave.jiang@intel.com>
Tue, 10 Mar 2020 17:51:09 +0000
(10:51 -0700)
committer
Vinod Koul
<vkoul@kernel.org>
Wed, 11 Mar 2020 09:38:52 +0000
(15:08 +0530)
The global token_limit is not tied to group tokens_reserved and
tokens_allowed parameters. Remove the check in order to allow independent
configuration.
Fixes:
c52ca478233c
("dmaengine: idxd: add configuration component of driver")
Reported-by: Yixin Zhang <yixin.zhang@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link:
https://lore.kernel.org/r/158386266911.11066.7545764533072221536.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/idxd/sysfs.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/dma/idxd/sysfs.c
b/drivers/dma/idxd/sysfs.c
index a74e99cb055d82c31de82db5d89b3e5c9089eb06..65b08da41329fd03e798000affb531e9b55a3ccf 100644
(file)
--- a/
drivers/dma/idxd/sysfs.c
+++ b/
drivers/dma/idxd/sysfs.c
@@
-509,9
+509,6
@@
static ssize_t group_tokens_reserved_store(struct device *dev,
if (idxd->state == IDXD_DEV_ENABLED)
return -EPERM;
- if (idxd->token_limit == 0)
- return -EPERM;
-
if (val > idxd->max_tokens)
return -EINVAL;
@@
-557,8
+554,6
@@
static ssize_t group_tokens_allowed_store(struct device *dev,
if (idxd->state == IDXD_DEV_ENABLED)
return -EPERM;
- if (idxd->token_limit == 0)
- return -EPERM;
if (val < 4 * group->num_engines ||
val > group->tokens_reserved + idxd->nr_tokens)
return -EINVAL;