Commit bca10f2c authored by Brett Creeley's avatar Brett Creeley Committed by Paolo Abeni

pds_core: Unmask adminq interrupt in work thread

Unmasking the interrupt during the pdsc_adminq_isr
is a bit early and could cause unnecessary interrupts.
Instead always unmask after processing the adminq
and notifyq in pdsc_work_thread()->pdsc_process_adminq().
Also, since we are always unmasking, there's no need
for the local credits variable in pdsc_process_adminq().
Signed-off-by: default avatarBrett Creeley <brett.creeley@amd.com>
Reviewed-by: default avatarShannon Nelson <shannon.nelson@amd.com>
Reviewed-by: default avatarPrzemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 02daffa9
...@@ -82,7 +82,6 @@ void pdsc_process_adminq(struct pdsc_qcq *qcq) ...@@ -82,7 +82,6 @@ void pdsc_process_adminq(struct pdsc_qcq *qcq)
unsigned long irqflags; unsigned long irqflags;
int nq_work = 0; int nq_work = 0;
int aq_work = 0; int aq_work = 0;
int credits;
/* Don't process AdminQ when it's not up */ /* Don't process AdminQ when it's not up */
if (!pdsc_adminq_inc_if_up(pdsc)) { if (!pdsc_adminq_inc_if_up(pdsc)) {
...@@ -128,11 +127,9 @@ void pdsc_process_adminq(struct pdsc_qcq *qcq) ...@@ -128,11 +127,9 @@ void pdsc_process_adminq(struct pdsc_qcq *qcq)
credits: credits:
/* Return the interrupt credits, one for each completion */ /* Return the interrupt credits, one for each completion */
credits = nq_work + aq_work; pds_core_intr_credits(&pdsc->intr_ctrl[qcq->intx],
if (credits) nq_work + aq_work,
pds_core_intr_credits(&pdsc->intr_ctrl[qcq->intx], PDS_CORE_INTR_CRED_REARM);
credits,
PDS_CORE_INTR_CRED_REARM);
refcount_dec(&pdsc->adminq_refcnt); refcount_dec(&pdsc->adminq_refcnt);
} }
...@@ -157,7 +154,6 @@ irqreturn_t pdsc_adminq_isr(int irq, void *data) ...@@ -157,7 +154,6 @@ irqreturn_t pdsc_adminq_isr(int irq, void *data)
qcq = &pdsc->adminqcq; qcq = &pdsc->adminqcq;
queue_work(pdsc->wq, &qcq->work); queue_work(pdsc->wq, &qcq->work);
pds_core_intr_mask(&pdsc->intr_ctrl[qcq->intx], PDS_CORE_INTR_MASK_CLEAR);
refcount_dec(&pdsc->adminq_refcnt); refcount_dec(&pdsc->adminq_refcnt);
return IRQ_HANDLED; return IRQ_HANDLED;
......
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