[PATCH 5/5] omap2/3/4: mailbox: retries in case of FIFO full

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From f2e895f74544876572adbe3328aa27d20aa1aec4 Mon Sep 17 00:00:00 2001
From: Hari Kanigeri <h-kanigeri2@xxxxxx>
Date: Fri, 4 Dec 2009 15:52:42 -0600
Subject: [PATCH 5/5] omap2/3/4: mailbox: retries in case of FIFO full

This patch enables check for the mailbox fifo full
Without this check in some extreme stress test cases
the FIFO seems to be still full when trying to send
the message

Signed-off-by: Hari Kanigeri <h-kanigeri2@xxxxxx>
---
 arch/arm/plat-omap/mailbox.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
index 4229cec..8795f18 100644
--- a/arch/arm/plat-omap/mailbox.c
+++ b/arch/arm/plat-omap/mailbox.c
@@ -71,10 +71,10 @@ static int __mbox_msg_send(struct omap_mbox *mbox, mbox_msg_t msg)
 	int ret = 0, i = 1000;
 
 	while (mbox_fifo_full(mbox)) {
-		if (mbox->ops->type == OMAP_MBOX_TYPE2)
-			return -1;
-		if (--i == 0)
+		if (--i == 0) {
+			printk(KERN_ERR "Mailbox send failure\n");
 			return -1;
+		}
 		udelay(1);
 	}
 	mbox_fifo_write(mbox, msg);
-- 
1.6.6.2

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux