From: Roy Pledge Date: Thu, 1 Aug 2019 20:16:59 +0000 (+0000) Subject: soc/fsl/qbman: Fix drain_mr_fqni() X-Git-Tag: v5.4-rc1~186^2~23^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=627da8bad530ec18c2111347fe559c5c21679220;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Li Yang --- diff --git a/drivers/soc/fsl/qbman/qman.c b/drivers/soc/fsl/qbman/qman.c index f10f77d..2989504 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;