summaryrefslogtreecommitdiffstats
path: root/linux
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-05-18 14:19:09 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-10-23 09:24:06 +0200
commit7f1f4282dcae5fcf3ed2c18b5b5f82b95301ff13 (patch)
tree58b2cd8f6c6ebaf6a2b918b2b77536259738b9aa /linux
parent69a5677c0f97a29d91cfdeb63d97426f7ac71dce (diff)
downloadrtems-libbsd-7f1f4282dcae5fcf3ed2c18b5b5f82b95301ff13.tar.bz2
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.
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/soc/fsl/qbman/qman.c6
1 files changed, 4 insertions, 2 deletions
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);