diff options
author | Roy Pledge <roy.pledge@nxp.com> | 2019-04-25 10:18:12 -0400 |
---|---|---|
committer | Daniel Thompson <daniel@redfelineninja.org.uk> | 2019-09-17 22:27:10 +0100 |
commit | 9df712e9ca9a57789bfc902b5689dedfed5e064d (patch) | |
tree | 38568cca246c8378a7c21fe9b644347adedd3b2a | |
parent | 26b378a669742cd1eb5893e8238302199473ddb9 (diff) |
soc/fsl/qbman: Fix drain_mr_fqni()
The drain_mr_fqni() function may be called fron uninterruptable
context so convert the msleep() to an mdelay(). Also ensure that
the valid bit is updated while polling.
Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
-rw-r--r-- | drivers/soc/fsl/qbman/qman.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/soc/fsl/qbman/qman.c b/drivers/soc/fsl/qbman/qman.c index baf35966e18f..e072b31f152f 100644 --- a/drivers/soc/fsl/qbman/qman.c +++ b/drivers/soc/fsl/qbman/qman.c @@ -1165,6 +1165,7 @@ static int drain_mr_fqrni(struct qm_portal *p) { const union qm_mr_entry *msg; loop: + qm_mr_pvb_update(p); msg = qm_mr_current(p); if (!msg) { /* @@ -1181,7 +1182,8 @@ loop: * entries well before the ring has been fully consumed, so * we're being *really* paranoid here. */ - msleep(1); + mdelay(1); + qm_mr_pvb_update(p); msg = qm_mr_current(p); if (!msg) return 0; |