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
This commit is contained in:
Shaun Ruffell 2010-10-20 12:22:52 +00:00
parent b4170d8f40
commit 8d29ecb783

View File

@ -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;