summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@intel.com>2022-05-05 18:05:07 +0300
committerVinod Koul <vkoul@kernel.org>2022-05-16 15:59:13 +0300
commitd0ad42388a396813771e9407614f40d128ad62db (patch)
tree53e8cc02bcb9bc423d63717cc0b9b1e43acaf5c5
parent8e6226f0f1a321de5f9ffdcb3fe920f94b45d38b (diff)
downloadlinux-d0ad42388a396813771e9407614f40d128ad62db.tar.xz
dmaengine: idxd: skip irq free when wq type is not kernel
Skip wq irq resources freeing when wq type is not kernel since the driver skips the irq alloction during wq enable. Add check in wq type check in idxd_wq_free_irq() to mirror idxd_wq_request_irq(). Fixes: 63c14ae6c161 ("dmaengine: idxd: refactor wq driver enable/disable operations") Reported-by: Tony Zu <tony.zhu@intel.com> Tested-by: Tony Zu <tony.zhu@intel.com> Signed-off-by: Dave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/165176310726.2112428.7474366910758522079.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
-rw-r--r--drivers/dma/idxd/device.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/dma/idxd/device.c b/drivers/dma/idxd/device.c
index dee5e4f8f426..8b1f8591ae83 100644
--- a/drivers/dma/idxd/device.c
+++ b/drivers/dma/idxd/device.c
@@ -1176,6 +1176,9 @@ void idxd_wq_free_irq(struct idxd_wq *wq)
struct idxd_device *idxd = wq->idxd;
struct idxd_irq_entry *ie = &wq->ie;
+ if (wq->type != IDXD_WQT_KERNEL)
+ return;
+
synchronize_irq(ie->vector);
free_irq(ie->vector, ie);
idxd_flush_pending_descs(ie);