summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSubin K G <subin.kg@ti.com>2011-07-06 18:40:47 -0500
committerAndy Green <andy.green@linaro.org>2011-09-26 17:28:27 +0100
commit36143b2ead554ce834199506a525a7f03ec18071 (patch)
tree983231ee445422550ab1c93c14217df4051c6525 /drivers
parentd35a523c22c4a721792d3f7b9ff7a24104543faf (diff)
syslink: ipc: limit the retry count for ipc attach
Currenlty ipc_attach is whiling inside the kernel till it become success.This has been changed to a retry for 500ms, after that it will report failure to userspace. This change is to avoid rebooting of the board, in case if ipc_attach fails. Change-Id: Ie47043c54858140e198af7354b9441232a117760 Signed-off-by: Subin K G <subin.kg@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/dsp/syslink/multicore_ipc/platform.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/dsp/syslink/multicore_ipc/platform.c b/drivers/dsp/syslink/multicore_ipc/platform.c
index 5ae0127faa13..3c5ca2921379 100644
--- a/drivers/dsp/syslink/multicore_ipc/platform.c
+++ b/drivers/dsp/syslink/multicore_ipc/platform.c
@@ -1721,17 +1721,18 @@ EXPORT_SYMBOL(platform_load_callback);
int platform_start_callback(u16 proc_id, void *arg)
{
int status = PLATFORM_S_SUCCESS;
+ int retry_count = 100;
do {
status = ipc_attach(proc_id);
- msleep(1);
- } while (status < 0);
+ msleep(5);
+ } while (--retry_count && status < 0);
if (status < 0)
- pr_err("platform_load_callback failed, status [0x%x]\n",
+ pr_err("platform_start_callback failed, status [0x%x]\n",
status);
-
- ipc_notify_event(IPC_START, &proc_id);
+ else
+ ipc_notify_event(IPC_START, &proc_id);
return status;
}