Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 627da8ba authored by Roy Pledge's avatar Roy Pledge Committed by Li Yang
Browse files

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: default avatarRoy Pledge <roy.pledge@nxp.com>
Signed-off-by: default avatarLi Yang <leoyang.li@nxp.com>
parent c5501aa9
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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 @@ static int drain_mr_fqrni(struct qm_portal *p)
		 * 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;