Commit 8ba89a3c authored by Dave Jiang's avatar Dave Jiang Committed by Vinod Koul

dmaengine: idxd: fix desc->vector that isn't being updated

Missing update for desc->vector when the wq vector gets updated. This
causes the desc->vector to always be at 0.

Fixes: da435aed ("dmaengine: idxd: fix array index when int_handles are being used")
Signed-off-by: default avatarDave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/162628784374.353761.4736602409627820431.stgit@djiang5-desk3.ch.intel.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent d5c10e0f
...@@ -25,11 +25,10 @@ static struct idxd_desc *__get_desc(struct idxd_wq *wq, int idx, int cpu) ...@@ -25,11 +25,10 @@ static struct idxd_desc *__get_desc(struct idxd_wq *wq, int idx, int cpu)
* Descriptor completion vectors are 1...N for MSIX. We will round * Descriptor completion vectors are 1...N for MSIX. We will round
* robin through the N vectors. * robin through the N vectors.
*/ */
wq->vec_ptr = (wq->vec_ptr % idxd->num_wq_irqs) + 1; wq->vec_ptr = desc->vector = (wq->vec_ptr % idxd->num_wq_irqs) + 1;
if (!idxd->int_handles) { if (!idxd->int_handles) {
desc->hw->int_handle = wq->vec_ptr; desc->hw->int_handle = wq->vec_ptr;
} else { } else {
desc->vector = wq->vec_ptr;
/* /*
* int_handles are only for descriptor completion. However for device * int_handles are only for descriptor completion. However for device
* MSIX enumeration, vec 0 is used for misc interrupts. Therefore even * MSIX enumeration, vec 0 is used for misc interrupts. Therefore even
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment