* [PATCH] dmaengine: idxd: set max_xfer and max_batch for RO device
@ 2022-04-11 22:11 Dave Jiang
2022-04-20 11:48 ` Vinod Koul
0 siblings, 1 reply; 2+ messages in thread
From: Dave Jiang @ 2022-04-11 22:11 UTC (permalink / raw)
To: vkoul; +Cc: dmaengine
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>
---
drivers/dma/idxd/device.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/dma/idxd/device.c b/drivers/dma/idxd/device.c
index f652da6ab47d..95c8c7d8d419 100644
--- a/drivers/dma/idxd/device.c
+++ b/drivers/dma/idxd/device.c
@@ -1018,6 +1018,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]);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] dmaengine: idxd: set max_xfer and max_batch for RO device
2022-04-11 22:11 [PATCH] dmaengine: idxd: set max_xfer and max_batch for RO device Dave Jiang
@ 2022-04-20 11:48 ` Vinod Koul
0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2022-04-20 11:48 UTC (permalink / raw)
To: Dave Jiang; +Cc: dmaengine
On 11-04-22, 15:11, Dave Jiang wrote:
> 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.
Applied, thanks
>
> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
> ---
> drivers/dma/idxd/device.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/dma/idxd/device.c b/drivers/dma/idxd/device.c
> index f652da6ab47d..95c8c7d8d419 100644
> --- a/drivers/dma/idxd/device.c
> +++ b/drivers/dma/idxd/device.c
> @@ -1018,6 +1018,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]);
>
--
~Vinod
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-04-20 11:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-11 22:11 [PATCH] dmaengine: idxd: set max_xfer and max_batch for RO device Dave Jiang
2022-04-20 11:48 ` Vinod Koul
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.