mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-14 12:31:27 +08:00
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:
@@ -1071,15 +1071,17 @@ static irqreturn_t portal_isr(int irq, void *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;
|
||||
|
||||
if (unlikely(!is))
|
||||
return IRQ_NONE;
|
||||
|
||||
/* 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);
|
||||
}
|
||||
/* Handling of anything else that's interrupt-driven */
|
||||
clear |= __poll_portal_slow(p, is);
|
||||
qm_out(&p->p, QM_REG_ISR, clear);
|
||||
|
Reference in New Issue
Block a user