diff options
author | Arun Murthy <arun.murthy@stericsson.com> | 2011-06-28 15:33:28 +0530 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@stericsson.com> | 2012-05-22 11:07:13 +0200 |
commit | bd003374c1653bf3c749c34e0211c4e2ded1b57b (patch) | |
tree | d7be3541bc9f86edb88ed21472679752909caf1b | |
parent | 9b451288d934c7117c1a3802ceeabf928d6b5ca4 (diff) |
u8500-shrm: display useful error message in case of failure
In case of failure, prints the parameters causing the failure, which
helps in debugging.
ST-Ericsson Linux next: Not Tested
ST-Ericsson ID: ER349776
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: Ie76025473740cfa7ffbfba0c41342d90ae7ff98e
Signed-off-by: Arun Murthy <arun.murthy@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/26013
Reviewed-by: QATEST
Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
-rw-r--r-- | drivers/modem/shrm/shrm_fifo.c | 26 | ||||
-rw-r--r-- | drivers/modem/shrm/shrm_protocol.c | 3 |
2 files changed, 16 insertions, 13 deletions
diff --git a/drivers/modem/shrm/shrm_fifo.c b/drivers/modem/shrm/shrm_fifo.c index 883966d4ab5..9e6564aa6bc 100644 --- a/drivers/modem/shrm/shrm_fifo.c +++ b/drivers/modem/shrm/shrm_fifo.c @@ -108,6 +108,7 @@ u8 read_boot_info_req(struct shrm_dev *shrm, msgtype = (header & L1_MAPID_MASK) >> L1_MSG_MAPID_OFFSET; if (msgtype != L1_BOOT_INFO_REQ) { dev_err(shrm->dev, "Read_Boot_Info_Req Fatal ERROR\n"); + dev_err(shrm->dev, "Received msgtype is %d\n", msgtype); BUG(); } *config = (header >> CONFIG_OFFSET) & MASK_0_15_BIT; @@ -401,17 +402,17 @@ u8 read_one_l2msg_common(struct shrm_dev *shrm, if (msgtype != L1_NORMAL_MSG) { /* Fatal ERROR - should never happens */ - dev_dbg(shrm->dev, "wr_wptr= %x\n", + dev_info(shrm->dev, "wr_wptr= %x\n", fifo->reader_local_wptr); - dev_dbg(shrm->dev, "wr_rptr= %x\n", + dev_info(shrm->dev, "wr_rptr= %x\n", fifo->reader_local_rptr); - dev_dbg(shrm->dev, "shared_wptr= %x\n", + dev_info(shrm->dev, "shared_wptr= %x\n", fifo->shared_wptr); - dev_dbg(shrm->dev, "shared_rptr= %x\n", + dev_info(shrm->dev, "shared_rptr= %x\n", fifo->shared_rptr); - dev_dbg(shrm->dev, "availsize= %x\n", + dev_info(shrm->dev, "availsize= %x\n", fifo->availablesize); - dev_dbg(shrm->dev, "end_fifo= %x\n", + dev_info(shrm->dev, "end_fifo= %x\n", fifo->end_addr_fifo); /* Fatal ERROR - should never happens */ dev_crit(shrm->dev, "Fatal ERROR - should never happen\n"); @@ -506,18 +507,19 @@ u8 read_one_l2msg_audio(struct shrm_dev *shrm, if (msgtype != L1_NORMAL_MSG) { /* Fatal ERROR - should never happens */ - dev_dbg(shrm->dev, "wr_local_wptr= %x\n", + dev_info(shrm->dev, "wr_local_wptr= %x\n", fifo->reader_local_wptr); - dev_dbg(shrm->dev, "wr_local_rptr= %x\n", + dev_info(shrm->dev, "wr_local_rptr= %x\n", fifo->reader_local_rptr); - dev_dbg(shrm->dev, "shared_wptr= %x\n", + dev_info(shrm->dev, "shared_wptr= %x\n", fifo->shared_wptr); - dev_dbg(shrm->dev, "shared_rptr= %x\n", + dev_info(shrm->dev, "shared_rptr= %x\n", fifo->shared_rptr); - dev_dbg(shrm->dev, "availsize=%x\n", + dev_info(shrm->dev, "availsize=%x\n", fifo->availablesize); - dev_dbg(shrm->dev, "end_fifo= %x\n", + dev_info(shrm->dev, "end_fifo= %x\n", fifo->end_addr_fifo); + dev_info(shrm->dev, "Received msgtype is &d\n", msgtype); /* Fatal ERROR - should never happens */ dev_crit(shrm->dev, "Fatal ERROR - should never happen\n"); BUG(); diff --git a/drivers/modem/shrm/shrm_protocol.c b/drivers/modem/shrm/shrm_protocol.c index 14fe28ca267..d2efbc6e5fd 100644 --- a/drivers/modem/shrm/shrm_protocol.c +++ b/drivers/modem/shrm/shrm_protocol.c @@ -985,7 +985,8 @@ int shm_write_msg(struct shrm_dev *shrm, u8 l2_header, if (boot_state != BOOT_DONE) { dev_err(shrm->dev, - "error after boot done call this fn\n"); + "error:after boot done call this fn, L2Header = %d\n", + l2_header); ret = -ENODEV; goto out; } |