diff options
author | Juan Gutierrez <jgutierrez@ti.com> | 2011-12-08 14:56:17 -0600 |
---|---|---|
committer | Ziyann <jaraidaniel@gmail.com> | 2014-10-01 12:55:38 +0200 |
commit | 62d9c36e15c343e179dac8d015091c2736c6404d (patch) | |
tree | 078774cf7338efc7fa360a38e00f2e4be1a04b96 /arch | |
parent | 6e956349e4f47877258a827b3a5ce1a24a62ee7c (diff) | |
download | kernel_samsung_tuna-62d9c36e15c343e179dac8d015091c2736c6404d.zip kernel_samsung_tuna-62d9c36e15c343e179dac8d015091c2736c6404d.tar.gz kernel_samsung_tuna-62d9c36e15c343e179dac8d015091c2736c6404d.tar.bz2 |
omap: rpmsg: sleep while recovering from mbox null situation
Mbox null situation, due to the auto-suspend path happening at the
same time a new message is trying to be sent, was workarounded by
trying to wake up Ducati in a loop. However the loop was not giving
the chance for the suspending path to completes. So, Ducati was never
wake it up again since it is necesary to be in suspended state.
This patch adds an sleep that gives a chance for the suspending path
to completes before trying to wake Ducati up again.
Change-Id: Ic6ecffc40f6651aef482d49da93086445fd391e2
Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/plat-omap/omap_rpmsg.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm/plat-omap/omap_rpmsg.c b/arch/arm/plat-omap/omap_rpmsg.c index 847f3d0..8ece479 100644 --- a/arch/arm/plat-omap/omap_rpmsg.c +++ b/arch/arm/plat-omap/omap_rpmsg.c @@ -32,6 +32,8 @@ #include <linux/notifier.h> #include <linux/memblock.h> #include <linux/remoteproc.h> +#include <linux/delay.h> + #include <asm/io.h> #include <plat/rpmsg.h> @@ -146,7 +148,7 @@ static void omap_rpmsg_notify(struct virtqueue *vq) { struct omap_rpmsg_vq_info *rpvq = vq->priv; int ret; - int count = 5; + int count = 15; pr_debug("sending mailbox msg: %d\n", rpvq->vq_id); do { @@ -155,6 +157,8 @@ static void omap_rpmsg_notify(struct virtqueue *vq) if (rpvq->rpdev->mbox) break; mutex_unlock(&rpvq->rpdev->lock); + msleep(30); + pr_err("Recovering from NULL mbox handle situation...\n"); } while (--count); if (!count) { pr_err("mbox handle is NULL\n"); |