From: Nithinsen Kaithakadan <nkaithaka...@marvell.com>

Reconfigure qsize in each CPT iq enable call.

Fixes: 3bf87839559 ("common/cnxk: move instruction queue enable to ROC")

Signed-off-by: Nithinsen Kaithakadan <nkaithaka...@marvell.com>
---
 drivers/common/cnxk/roc_cpt.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/common/cnxk/roc_cpt.c b/drivers/common/cnxk/roc_cpt.c
index b4bf0ccd64..d1ba2b8858 100644
--- a/drivers/common/cnxk/roc_cpt.c
+++ b/drivers/common/cnxk/roc_cpt.c
@@ -1125,9 +1125,14 @@ roc_cpt_iq_disable(struct roc_cpt_lf *lf)
 void
 roc_cpt_iq_enable(struct roc_cpt_lf *lf)
 {
+       union cpt_lf_q_size lf_q_size;
        union cpt_lf_inprog lf_inprog;
        union cpt_lf_ctl lf_ctl;
 
+       /* Reconfigure the QSIZE register to ensure NQ_PTR and DQ_PTR are reset 
*/
+       lf_q_size.u = plt_read64(lf->rbase + CPT_LF_Q_SIZE);
+       plt_write64(lf_q_size.u, lf->rbase + CPT_LF_Q_SIZE);
+
        /* Disable command queue */
        roc_cpt_iq_disable(lf);
 
-- 
2.25.1

Reply via email to