diff options
author | Dave Jiang <dave.jiang@intel.com> | 2023-09-08 13:10:45 -0700 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2023-10-04 13:00:34 +0530 |
commit | 7af1e0aceeb321cbc90fcf6fa0bec8870290377f (patch) | |
tree | 3d1ed889e0783836af5e8b09b1d056870480b65c /drivers/dma/idxd/dma.c | |
parent | c223bafdcbd51506df00509088efc62e08ef6c3f (diff) |
dmaengine: idxd: add wq driver name support for accel-config user tool
With the possibility of multiple wq drivers that can be bound to the wq,
the user config tool accel-config needs a way to know which wq driver to
bind to the wq. Introduce per wq driver_name sysfs attribute where the user
can indicate the driver to be bound to the wq. This allows accel-config to
just bind to the driver using wq->driver_name.
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Reviewed-by: Fenghua Yu <fenghua.yu@intel.com>
Acked-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20230908201045.4115614-1-fenghua.yu@intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/idxd/dma.c')
-rw-r--r-- | drivers/dma/idxd/dma.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/dma/idxd/dma.c b/drivers/dma/idxd/dma.c index 07623fb0f52f..47a01893cfdb 100644 --- a/drivers/dma/idxd/dma.c +++ b/drivers/dma/idxd/dma.c @@ -306,6 +306,12 @@ static int idxd_dmaengine_drv_probe(struct idxd_dev *idxd_dev) return -ENXIO; mutex_lock(&wq->wq_lock); + if (!idxd_wq_driver_name_match(wq, dev)) { + idxd->cmd_status = IDXD_SCMD_WQ_NO_DRV_NAME; + rc = -ENODEV; + goto err; + } + wq->type = IDXD_WQT_KERNEL; rc = drv_enable_wq(wq); |