diff options
author | Arun Murthy <arun.murthy@stericsson.com> | 2011-06-28 15:33:28 +0530 |
---|---|---|
committer | Mathieu J. Poirier <mathieu.poirier@linaro.org> | 2011-11-10 11:12:17 -0700 |
commit | 5b379c1880bde7d4b2649812c76974213d269f35 (patch) | |
tree | 855374ce87fa4e440431c73710d0e68c3999e538 | |
parent | 21b7d9a5fab6d7ea69bdfb5377115220071e5734 (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; } |