[svn-commits] sruffell: linux/trunk r9437 - /linux/trunk/drivers/dahdi/wctc4xxp/base.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Oct 20 07:22:54 CDT 2010


Author: sruffell
Date: Wed Oct 20 07:22:52 2010
New Revision: 9437

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9437
Log:
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 at digium.com>
Acked-by: Kinsey Moore <kmoore at digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks at digium.com>

Modified:
    linux/trunk/drivers/dahdi/wctc4xxp/base.c

Modified: linux/trunk/drivers/dahdi/wctc4xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wctc4xxp/base.c?view=diff&rev=9437&r1=9436&r2=9437
==============================================================================
--- linux/trunk/drivers/dahdi/wctc4xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wctc4xxp/base.c Wed Oct 20 07:22:52 2010
@@ -1139,9 +1139,12 @@
 		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;




More information about the svn-commits mailing list