Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dmaengine: idxd: set max_xfer and max_batch for RO device

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>

authored by

Dave Jiang and committed by
Vinod Koul
23084545 4e5a4eb2

+3
+3
drivers/dma/idxd/device.c
··· 1031 1031 1032 1032 wq->priority = wq->wqcfg->priority; 1033 1033 1034 + wq->max_xfer_bytes = 1ULL << wq->wqcfg->max_xfer_shift; 1035 + wq->max_batch_size = 1ULL << wq->wqcfg->max_batch_shift; 1036 + 1034 1037 for (i = 0; i < WQCFG_STRIDES(idxd); i++) { 1035 1038 wqcfg_offset = WQCFG_OFFSET(idxd, wq->id, i); 1036 1039 dev_dbg(dev, "WQ[%d][%d][%#x]: %#x\n", wq->id, i, wqcfg_offset, wq->wqcfg->bits[i]);