]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
soc/fsl/qman: Sleep instead of stuck hacking jiffies
authorKarim Eshapa <karim.eshapa@gmail.com>
Fri, 5 May 2017 05:45:18 +0000 (07:45 +0200)
committerLi Yang <leoyang.li@nxp.com>
Fri, 22 Sep 2017 18:32:57 +0000 (13:32 -0500)
Use msleep() instead of stucking with long delay will be more efficient.

Signed-off-by: Karim Eshapa <karim.eshapa@gmail.com>
Acked-by: Scott Wood <oss@buserror.net>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
drivers/soc/fsl/qbman/qman.c

index 18eefc3f1abea587f63e9a693ea2cbf7bd9ec119..da68f887ed82919526af13068ca47a0c86bf5844 100644 (file)
@@ -1084,11 +1084,7 @@ loop:
                 * entries well before the ring has been fully consumed, so
                 * we're being *really* paranoid here.
                 */
-               u64 now, then = jiffies;
-
-               do {
-                       now = jiffies;
-               } while ((then + 10000) > now);
+               msleep(1);
                msg = qm_mr_current(p);
                if (!msg)
                        return 0;