From: Roy Pledge <roy.pledge@nxp.com>
To: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Leo Li <leoyang.li@nxp.com>
Cc: Roy Pledge <roy.pledge@nxp.com>
Subject: [PATCH v2 4/7] soc/fsl/qbman: Fix drain_mr_fqni()
Date: Wed, 3 Jul 2019 20:59:32 +0000 [thread overview]
Message-ID: <1562187548-32261-5-git-send-email-roy.pledge@nxp.com> (raw)
In-Reply-To: <1562187548-32261-1-git-send-email-roy.pledge@nxp.com>
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>
---
drivers/soc/fsl/qbman/qman.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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 @@ 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;
--
2.7.4
next prev parent reply other threads:[~2019-07-03 20:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-03 20:59 [PATCH v2 0/7] soc/fsl/qbman: Enable Kexec for DPAA1 devices Roy Pledge
2019-07-03 20:59 ` [PATCH v2 1/7] soc/fsl/qbman: Rework QBMan private memory setup Roy Pledge
2019-07-03 20:59 ` [PATCH v2 2/7] soc/fsl/qbman: Cleanup buffer pools if BMan was initialized prior to bootup Roy Pledge
2019-07-03 20:59 ` [PATCH v2 3/7] soc/fsl/qbman: Cleanup QMan queues if device was already initialized Roy Pledge
2019-07-03 20:59 ` Roy Pledge [this message]
2019-07-03 20:59 ` [PATCH v2 5/7] soc/fsl/qbman: Disable interrupts during portal recovery Roy Pledge
2019-07-03 20:59 ` [PATCH v2 6/7] soc/fsl/qbman: Fixup qman_shutdown_fq() Roy Pledge
2019-07-03 20:59 ` [PATCH v2 7/7] soc/fsl/qbman: Update device tree with reserved memory Roy Pledge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1562187548-32261-5-git-send-email-roy.pledge@nxp.com \
--to=roy.pledge@nxp.com \
--cc=leoyang.li@nxp.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).