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:
4e5a4eb
)
dmaengine: idxd: set max_xfer and max_batch for RO device
author
Dave Jiang
<dave.jiang@intel.com>
Mon, 11 Apr 2022 22:11:16 +0000
(15:11 -0700)
committer
Vinod Koul
<vkoul@kernel.org>
Wed, 20 Apr 2022 11:47:33 +0000
(17:17 +0530)
Load the max_xfer_size and max_batch_size values from the values read from
registers to the shadow variables. This will allow the read-only device to
display the correct values for the sysfs attributes.
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link:
https://lore.kernel.org/r/164971507673.2201761.11244446608988838897.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/idxd/device.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/dma/idxd/device.c
b/drivers/dma/idxd/device.c
index 2903f8bb30e11a29aaa6987cd764ca9dcd9a9cb6..4f5c2367ec937bea5873a7985ca5d98f4019a735 100644
(file)
--- a/
drivers/dma/idxd/device.c
+++ b/
drivers/dma/idxd/device.c
@@
-1031,6
+1031,9
@@
static int idxd_wq_load_config(struct idxd_wq *wq)
wq->priority = wq->wqcfg->priority;
+ wq->max_xfer_bytes = 1ULL << wq->wqcfg->max_xfer_shift;
+ wq->max_batch_size = 1ULL << wq->wqcfg->max_batch_shift;
+
for (i = 0; i < WQCFG_STRIDES(idxd); i++) {
wqcfg_offset = WQCFG_OFFSET(idxd, wq->id, i);
dev_dbg(dev, "WQ[%d][%d][%#x]: %#x\n", wq->id, i, wqcfg_offset, wq->wqcfg->bits[i]);