dmaengine: idxd: Fix default allowed read buffers value in group
authorFenghua Yu <fenghua.yu@intel.com>
Fri, 27 Jan 2023 19:28:55 +0000 (11:28 -0800)
committerVinod Koul <vkoul@kernel.org>
Thu, 16 Feb 2023 13:15:48 +0000 (18:45 +0530)
commit601bdadadb505a72d9a76cc20cdfa252cba7ddc0
tree5e788a051c0a71fdc0d758c5ee648f19ae0849c4
parentb02e07015a5ac7bbc029da931ae17914b8ae0339
dmaengine: idxd: Fix default allowed read buffers value in group

Currently default read buffers that is allowed in a group is 0.
grpcfg will be configured to max read buffers that IDXD can support if
the group's allowed read buffers value is 0. But 0 is an invalid
read buffers value and user may get confused when seeing the invalid
initial value 0 through sysfs interface.

To show only valid allowed read buffers value and eliminate confusion,
directly initialize the allowed read buffers to IDXD's max read buffers.
User still can change the value through sysfs interface.

Suggested-by: Ramesh Thomas <ramesh.thomas@intel.com>
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Reviewed-by: Nikhil Rao <nikhil.rao@intel.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/20230127192855.966929-1-fenghua.yu@intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/idxd/device.c
drivers/dma/idxd/init.c