From f17300043facc5b4a3761a9864e413901d0b53fd Mon Sep 17 00:00:00 2001 From: Arun Murthy Date: Fri, 2 Dec 2011 15:22:25 +0530 Subject: u5500-mbox: reduce the hostaccess port ack timeout Reduce the timeout to 2sec for now as modem doesnt go to sleep. ST-Ericsson Linux next: NA ST-Ericsson ID: 400364 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: Icd9fed7b22d23d000aecf7643b0664fcd4ed2905 Signed-off-by: Arun Murthy Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/40785 Reviewed-by: QATOOLS Reviewed-by: QABUILD Reviewed-by: Bibek BASU Tested-by: Bibek BASU Reviewed-by: Srinidhi KASAGAR --- drivers/misc/mbox.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/misc/mbox.c b/drivers/misc/mbox.c index acea6962478..5a292e0053b 100644 --- a/drivers/misc/mbox.c +++ b/drivers/misc/mbox.c @@ -102,9 +102,10 @@ static void mbox_modem_req(void) mutex_lock(&modem_state_mutex); if (!db5500_prcmu_is_modem_requested()) { prcmu_modem_req(); + /* TODO: optimize this timeout */ if (!wait_for_completion_timeout(&mb->mod_req_ack_work, - msecs_to_jiffies(8000))) - printk(KERN_ERR "mbox:modem_req_ack timedout(8sec)\n"); + msecs_to_jiffies(2000))) + printk(KERN_ERR "mbox:modem_req_ack timedout(2sec)\n"); } atomic_set(&mb->mod_req, 1); mutex_unlock(&modem_state_mutex); @@ -170,7 +171,7 @@ int mbox_send(struct mbox *mbox, u32 mbox_msg, bool block) if (atomic_read(&mb->mod_reset)) { dev_err(&mbox->pdev->dev, "modem is in reset state, cannot proceed\n"); - res -EINVAL; + res = -EINVAL; goto exit; } writel(MBOX_ENABLE_IRQ, mbox->virtbase_peer + MBOX_FIFO_THRES_FREE); -- cgit v1.2.3