summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/mailbox.c
diff options
context:
space:
mode:
authorFernando Guzman Lugo <x0095840@ti.com>2010-02-08 13:35:40 -0600
committerHiroshi DOYU <Hiroshi.DOYU@nokia.com>2010-08-04 15:50:16 +0300
commit1ea5d6d18bf1d528ae1081b9176d69c00bd51fa2 (patch)
tree47b96ca53236ce4ccbb0c5432ae5f48e517bb8ee /arch/arm/plat-omap/mailbox.c
parent72b917ef90084885ffcc5adb69095af02d2b6996 (diff)
Mailbox: disable mailbox interrupt when request queue
when blk_get_request fails to get the request it is returning without read the message from the mailbox fifo, then when it leaves the isr and interruption is trigger again and again and the workqueue which get elements from the request queue is never executed and the kernel is stuck and shows a softlockup message. Now the mailbox interrupt is disabled when request queue is full and enabled when it pop a elememt form the request queue. Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com> Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Diffstat (limited to 'arch/arm/plat-omap/mailbox.c')
-rw-r--r--arch/arm/plat-omap/mailbox.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
index 986002b089f..c3402165488 100644
--- a/arch/arm/plat-omap/mailbox.c
+++ b/arch/arm/plat-omap/mailbox.c
@@ -32,6 +32,7 @@
static struct workqueue_struct *mboxd;
static struct omap_mbox *mboxes;
static DEFINE_RWLOCK(mboxes_lock);
+static bool rq_full;
static int mbox_configured;
static DEFINE_MUTEX(mbox_configured_lock);
@@ -141,6 +142,10 @@ static void mbox_rx_work(struct work_struct *work)
while (1) {
spin_lock_irqsave(q->queue_lock, flags);
rq = blk_fetch_request(q);
+ if (rq_full) {
+ omap_mbox_enable_irq(mbox, IRQ_RX);
+ rq_full = false;
+ }
spin_unlock_irqrestore(q->queue_lock, flags);
if (!rq)
break;
@@ -178,8 +183,11 @@ static void __mbox_rx_interrupt(struct omap_mbox *mbox)
while (!mbox_fifo_empty(mbox)) {
rq = blk_get_request(q, WRITE, GFP_ATOMIC);
- if (unlikely(!rq))
+ if (unlikely(!rq)) {
+ omap_mbox_disable_irq(mbox, IRQ_RX);
+ rq_full = true;
goto nomem;
+ }
msg = mbox_fifo_read(mbox);