diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dma/idxd/device.c | 12 | ||||
-rw-r--r-- | drivers/dma/idxd/init.c | 5 |
2 files changed, 11 insertions, 6 deletions
diff --git a/drivers/dma/idxd/device.c b/drivers/dma/idxd/device.c index 19ab3e55033e..751675391e8c 100644 --- a/drivers/dma/idxd/device.c +++ b/drivers/dma/idxd/device.c @@ -699,7 +699,11 @@ static void idxd_groups_clear_state(struct idxd_device *idxd) group->num_engines = 0; group->num_wqs = 0; group->use_rdbuf_limit = false; - group->rdbufs_allowed = 0; + /* + * The default value is the same as the value of + * total read buffers in GRPCAP. + */ + group->rdbufs_allowed = idxd->max_rdbufs; group->rdbufs_reserved = 0; if (idxd->hw.version <= DEVICE_VERSION_2 && !tc_override) { group->tc_a = 1; @@ -934,11 +938,7 @@ static void idxd_group_flags_setup(struct idxd_device *idxd) group->grpcfg.flags.tc_b = group->tc_b; group->grpcfg.flags.use_rdbuf_limit = group->use_rdbuf_limit; group->grpcfg.flags.rdbufs_reserved = group->rdbufs_reserved; - if (group->rdbufs_allowed) - group->grpcfg.flags.rdbufs_allowed = group->rdbufs_allowed; - else - group->grpcfg.flags.rdbufs_allowed = idxd->max_rdbufs; - + group->grpcfg.flags.rdbufs_allowed = group->rdbufs_allowed; group->grpcfg.flags.desc_progress_limit = group->desc_progress_limit; group->grpcfg.flags.batch_progress_limit = group->batch_progress_limit; } diff --git a/drivers/dma/idxd/init.c b/drivers/dma/idxd/init.c index e63b0c674d88..640d3048368e 100644 --- a/drivers/dma/idxd/init.c +++ b/drivers/dma/idxd/init.c @@ -302,6 +302,11 @@ static int idxd_setup_groups(struct idxd_device *idxd) group->tc_a = -1; group->tc_b = -1; } + /* + * The default value is the same as the value of + * total read buffers in GRPCAP. + */ + group->rdbufs_allowed = idxd->max_rdbufs; } return 0; |