summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wctc4xxp
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2010-10-20 12:22:52 +0000
committerShaun Ruffell <sruffell@digium.com>2010-10-20 12:22:52 +0000
commit2afa887a004129cc7ef0e76dfcb6b9aaa5eb23ce (patch)
treefca23f2e4f70ed1dbf8b5609355fb4960d2e4217 /drivers/dahdi/wctc4xxp
parent07f36d1c934b37d034bd66bf2d60f669c91997f0 (diff)
wctc4xxp: 'WARN_ON(1)' -> 'dev_info(...' on channel creation failure.
If the DSP ever finds it's way into a bad state it can be possible for a timeslot to get 'wedged'. All attempts to create a channel in a wedged timeslot will fail and the WARN_ON macro can quickly fill the logs. This change adds some more debugging information (which timeslot is wedged) along with the result code from the DSP and puts it all behind a printk_ratelimit. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9437 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/wctc4xxp')
-rw-r--r--drivers/dahdi/wctc4xxp/base.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/dahdi/wctc4xxp/base.c b/drivers/dahdi/wctc4xxp/base.c
index 5e0133b..8e35a36 100644
--- a/drivers/dahdi/wctc4xxp/base.c
+++ b/drivers/dahdi/wctc4xxp/base.c
@@ -1139,9 +1139,12 @@ send_create_channel_cmd(struct wcdte *wc, struct tcb *cmd, u16 timeslot,
return res;
if (0x0000 != response_header(cmd)->params[0]) {
- /* The DTE failed to create the channel. */
- /* TODO put some debug information here. */
- WARN_ON(1);
+ if (printk_ratelimit()) {
+ dev_warn(&wc->pdev->dev,
+ "Failed to create channel in timeslot " \
+ "%d. Response from DTE was (%04x).\n",
+ timeslot, response_header(cmd)->params[0]);
+ }
free_cmd(cmd->response);
cmd->response = NULL;
return -EIO;