aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFernando Guzman Lugo <x0095840@ti.com>2010-09-15 18:03:20 -0400
committerPaolo Pisati <paolo.pisati@canonical.com>2012-08-17 04:19:07 -0400
commit98d7943220835ab9699035b36736123a406cd40a (patch)
treef3b84fdaaa6a106a95271c9dc33189701841e336
parent6ddd78fdf22a6536c9a0802e0215b38654cac585 (diff)
mailbox: change full flag per mailbox queue instead of global
As pointed by Ohad Ben-Cohen, the variable rq_full flag is a global variable, so if there are multiple mailbox users there will be conflics. Now there is a full flag per mailbox queue. Version 2: - Rebase to the latest. Reported-by: Ohad Ben-Cohen <ohad@wizery.com> Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com>
-rw-r--r--arch/arm/plat-omap/mailbox.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
index 9637eceb6ea..b6137aa0321 100644
--- a/arch/arm/plat-omap/mailbox.c
+++ b/arch/arm/plat-omap/mailbox.c
@@ -152,7 +152,7 @@ static void mbox_rx_work(struct work_struct *work)
152 WARN_ON(len != sizeof(msg)); 152 WARN_ON(len != sizeof(msg));
153 153
154 blocking_notifier_call_chain(&mq->mbox->notifier, len, 154 blocking_notifier_call_chain(&mq->mbox->notifier, len,
155 (void *)msg); 155 (void *)msg);
156 spin_lock_irq(&mq->lock); 156 spin_lock_irq(&mq->lock);
157 if (mq->full) { 157 if (mq->full) {
158 mq->full = false; 158 mq->full = false;
@@ -198,7 +198,7 @@ static void __mbox_rx_interrupt(struct omap_mbox *mbox)
198 msg_rx = true; 198 msg_rx = true;
199 if (unlikely(kfifo_avail(&mq->fifo) < sizeof(msg))) { 199 if (unlikely(kfifo_avail(&mq->fifo) < sizeof(msg))) {
200 omap_mbox_disable_irq(mbox_curr, IRQ_RX); 200 omap_mbox_disable_irq(mbox_curr, IRQ_RX);
201 rq_full = true; 201 mq->full = true;
202 goto nomem; 202 goto nomem;
203 } 203 }
204 204