summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/amd
diff options
context:
space:
mode:
authorBrett Creeley <brett.creeley@amd.com>2024-02-02 20:59:09 +0100
committerPaolo Abeni <pabeni@redhat.com>2024-02-06 13:26:54 +0100
commitbca10f2c2518b333275becb7f53d6511f622e084 (patch)
tree04e109660cef4fae7a7768c7da3e102df2387f3b /drivers/net/ethernet/amd
parentpds_core: Don't assign interrupt index/bound_intr to notifyq (diff)
downloadlinux-bca10f2c2518b333275becb7f53d6511f622e084.tar.xz
linux-bca10f2c2518b333275becb7f53d6511f622e084.zip
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: Brett Creeley <brett.creeley@amd.com> Reviewed-by: Shannon Nelson <shannon.nelson@amd.com> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/net/ethernet/amd')
-rw-r--r--drivers/net/ethernet/amd/pds_core/adminq.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/net/ethernet/amd/pds_core/adminq.c b/drivers/net/ethernet/amd/pds_core/adminq.c
index ea773cfa0af6..c83a0a80d533 100644
--- a/drivers/net/ethernet/amd/pds_core/adminq.c
+++ b/drivers/net/ethernet/amd/pds_core/adminq.c
@@ -82,7 +82,6 @@ void pdsc_process_adminq(struct pdsc_qcq *qcq)
unsigned long irqflags;
int nq_work = 0;
int aq_work = 0;
- int credits;
/* Don't process AdminQ when it's not up */
if (!pdsc_adminq_inc_if_up(pdsc)) {
@@ -128,11 +127,9 @@ void pdsc_process_adminq(struct pdsc_qcq *qcq)
credits:
/* Return the interrupt credits, one for each completion */
- credits = nq_work + aq_work;
- if (credits)
- pds_core_intr_credits(&pdsc->intr_ctrl[qcq->intx],
- credits,
- PDS_CORE_INTR_CRED_REARM);
+ pds_core_intr_credits(&pdsc->intr_ctrl[qcq->intx],
+ nq_work + aq_work,
+ PDS_CORE_INTR_CRED_REARM);
refcount_dec(&pdsc->adminq_refcnt);
}
@@ -157,7 +154,6 @@ irqreturn_t pdsc_adminq_isr(int irq, void *data)
qcq = &pdsc->adminqcq;
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);
return IRQ_HANDLED;