soc: fsl: qbman: read ithresh from HW
authorMadalin Bucur <madalin.bucur@nxp.com>
Wed, 21 Nov 2018 11:41:07 +0000 (13:41 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Nov 2018 19:17:06 +0000 (11:17 -0800)
Read the DQRR interrupt threshold directly from the hardware.

Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/soc/fsl/qbman/qman.c

index 5ce24718c2fd1aa37ef0206a12a102025a987b7d..ce7c03052e3365be0e9ca72684f9d4b21cee2231 100644 (file)
@@ -1025,7 +1025,7 @@ EXPORT_SYMBOL(qman_dqrr_set_ithresh);
 void qman_dqrr_get_ithresh(struct qman_portal *portal, u8 *ithresh)
 {
        if (portal && ithresh)
-               *ithresh = portal->p.dqrr.ithresh;
+               *ithresh = qm_in(&portal->p, QM_REG_DQRR_ITR);
 }
 EXPORT_SYMBOL(qman_dqrr_get_ithresh);