summaryrefslogtreecommitdiffstats
path: root/drivers/soc
diff options
context:
space:
mode:
authorRoy Pledge <roy.pledge@nxp.com>2019-08-01 22:16:59 +0200
committerLi Yang <leoyang.li@nxp.com>2019-08-15 23:41:49 +0200
commit627da8bad530ec18c2111347fe559c5c21679220 (patch)
treea77861c0d11701e73d313b2d2debaa36a7d4ba4f /drivers/soc
parentsoc/fsl/qbman: Cleanup QMan queues if device was already initialized (diff)
downloadlinux-627da8bad530ec18c2111347fe559c5c21679220.tar.xz
linux-627da8bad530ec18c2111347fe559c5c21679220.zip
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> Signed-off-by: Li Yang <leoyang.li@nxp.com>
Diffstat (limited to 'drivers/soc')
-rw-r--r--drivers/soc/fsl/qbman/qman.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/soc/fsl/qbman/qman.c b/drivers/soc/fsl/qbman/qman.c
index f10f77dc04b9..29895044f04d 100644
--- a/drivers/soc/fsl/qbman/qman.c
+++ b/drivers/soc/fsl/qbman/qman.c
@@ -1164,6 +1164,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) {
/*
@@ -1180,7 +1181,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;