diff options
Diffstat (limited to 'arch/arm/plat-omap/mailbox.c')
-rw-r--r-- | arch/arm/plat-omap/mailbox.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c index d2fafb892f7f..48e161c642a5 100644 --- a/arch/arm/plat-omap/mailbox.c +++ b/arch/arm/plat-omap/mailbox.c | |||
@@ -33,7 +33,6 @@ | |||
33 | 33 | ||
34 | static struct workqueue_struct *mboxd; | 34 | static struct workqueue_struct *mboxd; |
35 | static struct omap_mbox **mboxes; | 35 | static struct omap_mbox **mboxes; |
36 | static bool rq_full; | ||
37 | 36 | ||
38 | static int mbox_configured; | 37 | static int mbox_configured; |
39 | static DEFINE_MUTEX(mbox_configured_lock); | 38 | static DEFINE_MUTEX(mbox_configured_lock); |
@@ -148,6 +147,12 @@ static void mbox_rx_work(struct work_struct *work) | |||
148 | 147 | ||
149 | if (mq->callback) | 148 | if (mq->callback) |
150 | mq->callback((void *)msg); | 149 | mq->callback((void *)msg); |
150 | spin_lock_irq(&mq->lock); | ||
151 | if (mq->full) { | ||
152 | mq->full = false; | ||
153 | omap_mbox_enable_irq(mq->mbox, IRQ_RX); | ||
154 | } | ||
155 | spin_unlock_irq(&mq->lock); | ||
151 | } | 156 | } |
152 | } | 157 | } |
153 | 158 | ||
@@ -170,7 +175,7 @@ static void __mbox_rx_interrupt(struct omap_mbox *mbox) | |||
170 | while (!mbox_fifo_empty(mbox)) { | 175 | while (!mbox_fifo_empty(mbox)) { |
171 | if (unlikely(kfifo_avail(&mq->fifo) < sizeof(msg))) { | 176 | if (unlikely(kfifo_avail(&mq->fifo) < sizeof(msg))) { |
172 | omap_mbox_disable_irq(mbox, IRQ_RX); | 177 | omap_mbox_disable_irq(mbox, IRQ_RX); |
173 | rq_full = true; | 178 | mq->full = true; |
174 | goto nomem; | 179 | goto nomem; |
175 | } | 180 | } |
176 | 181 | ||