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);
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;
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);