Skip to content

Commit 91124ac

Browse files
davejiangvinodkoul
authored andcommitted
dmaengine: idxd: remove global token limit check
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: c52ca47 ("dmaengine: idxd: add configuration component of driver") Reported-by: Yixin Zhang <[email protected]> Signed-off-by: Dave Jiang <[email protected]> Link: https://lore.kernel.org/r/158386266911.11066.7545764533072221536.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul <[email protected]>
1 parent a1fcaf0 commit 91124ac

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

drivers/dma/idxd/sysfs.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -509,9 +509,6 @@ static ssize_t group_tokens_reserved_store(struct device *dev,
509509
if (idxd->state == IDXD_DEV_ENABLED)
510510
return -EPERM;
511511

512-
if (idxd->token_limit == 0)
513-
return -EPERM;
514-
515512
if (val > idxd->max_tokens)
516513
return -EINVAL;
517514

@@ -557,8 +554,6 @@ static ssize_t group_tokens_allowed_store(struct device *dev,
557554
if (idxd->state == IDXD_DEV_ENABLED)
558555
return -EPERM;
559556

560-
if (idxd->token_limit == 0)
561-
return -EPERM;
562557
if (val < 4 * group->num_engines ||
563558
val > group->tokens_reserved + idxd->nr_tokens)
564559
return -EINVAL;

0 commit comments

Comments
 (0)