diff options
-rw-r--r-- | arch/arm/plat-omap/mailbox.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c index 986002b089fd..c3402165488d 100644 --- a/arch/arm/plat-omap/mailbox.c +++ b/arch/arm/plat-omap/mailbox.c | |||
@@ -32,6 +32,7 @@ | |||
32 | static struct workqueue_struct *mboxd; | 32 | static struct workqueue_struct *mboxd; |
33 | static struct omap_mbox *mboxes; | 33 | static struct omap_mbox *mboxes; |
34 | static DEFINE_RWLOCK(mboxes_lock); | 34 | static DEFINE_RWLOCK(mboxes_lock); |
35 | static bool rq_full; | ||
35 | 36 | ||
36 | static int mbox_configured; | 37 | static int mbox_configured; |
37 | static DEFINE_MUTEX(mbox_configured_lock); | 38 | static DEFINE_MUTEX(mbox_configured_lock); |
@@ -141,6 +142,10 @@ static void mbox_rx_work(struct work_struct *work) | |||
141 | while (1) { | 142 | while (1) { |
142 | spin_lock_irqsave(q->queue_lock, flags); | 143 | spin_lock_irqsave(q->queue_lock, flags); |
143 | rq = blk_fetch_request(q); | 144 | rq = blk_fetch_request(q); |
145 | if (rq_full) { | ||
146 | omap_mbox_enable_irq(mbox, IRQ_RX); | ||
147 | rq_full = false; | ||
148 | } | ||
144 | spin_unlock_irqrestore(q->queue_lock, flags); | 149 | spin_unlock_irqrestore(q->queue_lock, flags); |
145 | if (!rq) | 150 | if (!rq) |
146 | break; | 151 | break; |
@@ -178,8 +183,11 @@ static void __mbox_rx_interrupt(struct omap_mbox *mbox) | |||
178 | 183 | ||
179 | while (!mbox_fifo_empty(mbox)) { | 184 | while (!mbox_fifo_empty(mbox)) { |
180 | rq = blk_get_request(q, WRITE, GFP_ATOMIC); | 185 | rq = blk_get_request(q, WRITE, GFP_ATOMIC); |
181 | if (unlikely(!rq)) | 186 | if (unlikely(!rq)) { |
187 | omap_mbox_disable_irq(mbox, IRQ_RX); | ||
188 | rq_full = true; | ||
182 | goto nomem; | 189 | goto nomem; |
190 | } | ||
183 | 191 | ||
184 | msg = mbox_fifo_read(mbox); | 192 | msg = mbox_fifo_read(mbox); |
185 | 193 | ||