diff options
author | Arun Murthy <arun.murthy@stericsson.com> | 2012-02-08 17:31:03 +0530 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@stericsson.com> | 2012-05-22 11:07:26 +0200 |
commit | a08ca73e20e0ffd54c210e0d44b2dc217d7dfea8 (patch) | |
tree | 5df0536db7565e39b51a0204124a0d2d20985032 /drivers | |
parent | 211d77b805e2c7f5f1ef02ecc6c777a313f5688d (diff) |
u8500-shrm: fix potential issues while asserting modem reset
ST-Ericsson Linux next: NA
ST-Ericsson ID: 413508
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: Ie34c827ba78398ce81403c6ee24cd82b4f2100c1
Signed-off-by: Arun Murthy <arun.murthy@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/48275
Reviewed-by: QABUILD
Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/modem/shrm/shrm_protocol.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/modem/shrm/shrm_protocol.c b/drivers/modem/shrm/shrm_protocol.c index aad2431324d..151ccf4c5a0 100644 --- a/drivers/modem/shrm/shrm_protocol.c +++ b/drivers/modem/shrm/shrm_protocol.c @@ -807,7 +807,7 @@ void shm_nl_receive(struct sk_buff *skb) case SHRM_NL_USER_MOD_RESET: dev_info(shm_dev->dev, "user-space inited mod-reset-req\n"); dev_info(shm_dev->dev, "PCRMU resets modem\n"); - if (atomic_read(&mod_stuck)) { + if (atomic_read(&mod_stuck) || atomic_read(&fifo_full)) { dev_info(shm_dev->dev, "Modem reset already in progress\n"); break; @@ -1043,8 +1043,10 @@ irqreturn_t ac_read_notif_0_irq_handler(int irq, void *ctrlr) spin_lock_irqsave(&start_timer_lock, flags); hrtimer_cancel(&mod_stuck_timer_0); spin_unlock_irqrestore(&start_timer_lock, flags); - if(atomic_read(&fifo_full)) + if(atomic_read(&fifo_full)) { + atomic_set(&fifo_full, 0); hrtimer_cancel(&fifo_full_timer); + } if (check_modem_in_reset()) { dev_err(shrm->dev, "%s:Modem state reset or unknown.\n", @@ -1081,8 +1083,10 @@ irqreturn_t ac_read_notif_1_irq_handler(int irq, void *ctrlr) spin_lock_irqsave(&start_timer_lock, flags); hrtimer_cancel(&mod_stuck_timer_1); spin_unlock_irqrestore(&start_timer_lock, flags); - if(atomic_read(&fifo_full)) + if(atomic_read(&fifo_full)) { + atomic_set(&fifo_full, 0); hrtimer_cancel(&fifo_full_timer); + } if (check_modem_in_reset()) { dev_err(shrm->dev, "%s:Modem state reset or unknown.\n", |