[v2] drivers/octeontx2: fix recursive qint interrupts

Message ID 1564050397-12361-1-git-send-email-hkalra@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series [v2] drivers/octeontx2: fix recursive qint interrupts |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-Compile-Testing success Compile Testing PASS
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Performance-Testing success Performance Testing PASS

Commit Message

Harman Kalra July 25, 2019, 10:26 a.m. UTC
  In case of QINT interrupt occurrence, SW fails to clear the QINT
line resulting in recursive interrupts because currently interrupt
handler gets the cause of the interrupt by reading
NIX_LF_RQ[SQ/CQ/AURA/POOL]_OP_INT but does not write 1 to clear
RQ[SQ/CQ/ERR]_INT field in respective NIX_LF_RQ[SQ/CQ/AURA/POOL]_OP_INT
registers.

Fixes: dc47ba15f645 ("net/octeontx2: handle queue specific error interrupts")
Fixes: 50b95c3ea7af ("mempool/octeontx2: add NPA IRQ handler")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
---
 drivers/mempool/octeontx2/otx2_mempool_irq.c | 2 +-
 drivers/net/octeontx2/otx2_ethdev_irq.c      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
  

Comments

Jerin Jacob Kollanukkaran July 27, 2019, 11:56 a.m. UTC | #1
> -----Original Message-----
> From: Harman Kalra <hkalra@marvell.com>
> Sent: Thursday, July 25, 2019 3:57 PM
> To: Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Nithin Kumar
> Dabilpuram <ndabilpuram@marvell.com>; Vamsi Krishna Attunuru
> <vattunuru@marvell.com>; Kiran Kumar Kokkilagadda
> <kirankumark@marvell.com>
> Cc: dev@dpdk.org; Harman Kalra <hkalra@marvell.com>
> Subject: [PATCH v2] drivers/octeontx2: fix recursive qint interrupts
> 
> In case of QINT interrupt occurrence, SW fails to clear the QINT line resulting
> in recursive interrupts because currently interrupt handler gets the cause of
> the interrupt by reading NIX_LF_RQ[SQ/CQ/AURA/POOL]_OP_INT but does
> not write 1 to clear RQ[SQ/CQ/ERR]_INT field in respective
> NIX_LF_RQ[SQ/CQ/AURA/POOL]_OP_INT registers.
> 
> Fixes: dc47ba15f645 ("net/octeontx2: handle queue specific error
> interrupts")
> Fixes: 50b95c3ea7af ("mempool/octeontx2: add NPA IRQ handler")
> 
> Signed-off-by: Harman Kalra <hkalra@marvell.com>

Acked-by: Jerin Jacob <jerinj@marvell.com>
  
Thomas Monjalon July 29, 2019, 7:51 p.m. UTC | #2
27/07/2019 13:56, Jerin Jacob Kollanukkaran:
> > -----Original Message-----
> > From: Harman Kalra <hkalra@marvell.com>
> > Sent: Thursday, July 25, 2019 3:57 PM
> > To: Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Nithin Kumar
> > Dabilpuram <ndabilpuram@marvell.com>; Vamsi Krishna Attunuru
> > <vattunuru@marvell.com>; Kiran Kumar Kokkilagadda
> > <kirankumark@marvell.com>
> > Cc: dev@dpdk.org; Harman Kalra <hkalra@marvell.com>
> > Subject: [PATCH v2] drivers/octeontx2: fix recursive qint interrupts
> > 
> > In case of QINT interrupt occurrence, SW fails to clear the QINT line resulting
> > in recursive interrupts because currently interrupt handler gets the cause of
> > the interrupt by reading NIX_LF_RQ[SQ/CQ/AURA/POOL]_OP_INT but does
> > not write 1 to clear RQ[SQ/CQ/ERR]_INT field in respective
> > NIX_LF_RQ[SQ/CQ/AURA/POOL]_OP_INT registers.
> > 
> > Fixes: dc47ba15f645 ("net/octeontx2: handle queue specific error
> > interrupts")
> > Fixes: 50b95c3ea7af ("mempool/octeontx2: add NPA IRQ handler")
> > 
> > Signed-off-by: Harman Kalra <hkalra@marvell.com>
> 
> Acked-by: Jerin Jacob <jerinj@marvell.com>

Applied, thanks
  

Patch

diff --git a/drivers/mempool/octeontx2/otx2_mempool_irq.c b/drivers/mempool/octeontx2/otx2_mempool_irq.c
index ce4104453..5fa22b961 100644
--- a/drivers/mempool/octeontx2/otx2_mempool_irq.c
+++ b/drivers/mempool/octeontx2/otx2_mempool_irq.c
@@ -123,7 +123,7 @@  npa_lf_q_irq_get_and_clear(struct otx2_npa_lf *lf, uint32_t q,
 
 	qint = reg & 0xff;
 	wdata &= mask;
-	otx2_write64(wdata, lf->base + off);
+	otx2_write64(wdata | qint, lf->base + off);
 
 	return qint;
 }
diff --git a/drivers/net/octeontx2/otx2_ethdev_irq.c b/drivers/net/octeontx2/otx2_ethdev_irq.c
index 9006e5c8b..2256e40b6 100644
--- a/drivers/net/octeontx2/otx2_ethdev_irq.c
+++ b/drivers/net/octeontx2/otx2_ethdev_irq.c
@@ -138,7 +138,7 @@  nix_lf_q_irq_get_and_clear(struct otx2_eth_dev *dev, uint16_t q,
 
 	qint = reg & 0xff;
 	wdata &= mask;
-	otx2_write64(wdata, dev->base + off);
+	otx2_write64(wdata | qint, dev->base + off);
 
 	return qint;
 }