From 2afa887a004129cc7ef0e76dfcb6b9aaa5eb23ce Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Wed, 20 Oct 2010 12:22:52 +0000 Subject: 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 Acked-by: Kinsey Moore Acked-by: Russ Meyerriecks git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9437 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/wctc4xxp/base.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'drivers/dahdi/wctc4xxp') 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; -- cgit v1.2.3