qman_api.c: Prevent false clearing of IRQ status

Adding (p->irq_sources & ~QM_PIRQ_CSCI) to the clear mask means for
example we clear the QM_PIRQ_EQCI unconditionally.  This is a problem in
case this interrupt happens after the read of the interrupt status and
before the interrupt status clear.
This commit is contained in:
Sebastian Huber
2017-05-18 14:19:09 +02:00
parent 69a5677c0f
commit 7f1f4282dc

View File

@@ -1071,15 +1071,17 @@ static irqreturn_t portal_isr(int irq, void *ptr)
{ {
struct qman_portal *p = ptr; struct qman_portal *p = ptr;
u32 clear = QM_DQAVAIL_MASK | p->irq_sources; u32 clear = QM_DQAVAIL_MASK;
u32 is = qm_in(&p->p, QM_REG_ISR) & p->irq_sources; u32 is = qm_in(&p->p, QM_REG_ISR) & p->irq_sources;
if (unlikely(!is)) if (unlikely(!is))
return IRQ_NONE; return IRQ_NONE;
/* DQRR-handling if it's interrupt-driven */ /* DQRR-handling if it's interrupt-driven */
if (is & QM_PIRQ_DQRI) if (is & QM_PIRQ_DQRI) {
clear |= QM_PIRQ_DQRI;
__poll_portal_fast(p, QMAN_POLL_LIMIT); __poll_portal_fast(p, QMAN_POLL_LIMIT);
}
/* Handling of anything else that's interrupt-driven */ /* Handling of anything else that's interrupt-driven */
clear |= __poll_portal_slow(p, is); clear |= __poll_portal_slow(p, is);
qm_out(&p->p, QM_REG_ISR, clear); qm_out(&p->p, QM_REG_ISR, clear);