From 7f1f4282dcae5fcf3ed2c18b5b5f82b95301ff13 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 18 May 2017 14:19:09 +0200 Subject: 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. --- linux/drivers/soc/fsl/qbman/qman.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'linux') diff --git a/linux/drivers/soc/fsl/qbman/qman.c b/linux/drivers/soc/fsl/qbman/qman.c index 20a445e1..de3fc7b2 100644 --- a/linux/drivers/soc/fsl/qbman/qman.c +++ b/linux/drivers/soc/fsl/qbman/qman.c @@ -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); -- cgit v1.2.3