summaryrefslogtreecommitdiff
path: root/xpp/zap_debug.h
diff options
context:
space:
mode:
authortzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-08-03 22:12:07 +0000
committertzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-08-03 22:12:07 +0000
commit951177e02d11f64d9072c8a9fb973e530c2a2b71 (patch)
tree73dd8aa6317a97482c9b31057f2fb3e586feb338 /xpp/zap_debug.h
parentc88eaa22e13bd4c092b367a28e57064659660466 (diff)
xpp.r4415: (from 1.2 r2811)
* Show Astribank 6+2 as 6/2 channels and not 8/8 channels. - Added as a "subtype" to the device type (r4391). * Fixed a panic in BRI span shutdown method (r4393). * Changes to debug macros. * Add proper sysfs support (r4406) - A bus on whuch all of the Astribanks reside. - Replaces useless sysfs code that existed in the module. - Currently used to set the sync source automatically at device adition / removal. * BRI: We do need the T1 timer in NT. If it gets into G2 state (r4407). Merged revisions 2812 via svnmerge from https://origsvn.digium.com/svn/zaptel/branches/1.4 ........ * Ignore generated files on the new wctdm24xxp dir. (from 1.2 r2796) * Ignore two extra man pages on xpp/utils . Merged revisions 2797 via svnmerge from https://origsvn.digium.com/svn/zaptel/branches/1.4 ........ * Generate list of Zaptel Modules directories automatically. * Evaluate PERLLIBDIR only once. Closes: #10223 (Xorcom changeset:4379, from 1.2 r2758) Merged revisions 2759 via svnmerge from https://origsvn.digium.com/svn/zaptel/branches/1.4 git-svn-id: http://svn.digium.com/svn/zaptel/trunk@2814 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp/zap_debug.h')
-rw-r--r--xpp/zap_debug.h44
1 files changed, 38 insertions, 6 deletions
diff --git a/xpp/zap_debug.h b/xpp/zap_debug.h
index 29403a8..a234cca 100644
--- a/xpp/zap_debug.h
+++ b/xpp/zap_debug.h
@@ -23,13 +23,45 @@
*/
/* Debugging Macros */
+
+#define PRINTK(level, fmt, ...) \
+ printk(KERN_ ## level "%s-%s: " fmt, #level, THIS_MODULE->name, ## __VA_ARGS__)
+
+#define XBUS_PRINTK(level, xbus, fmt, ...) \
+ printk(KERN_ ## level "%s-%s: %s: " fmt, #level, \
+ THIS_MODULE->name, (xbus)->busname, ## __VA_ARGS__)
+
+#define XPD_PRINTK(level, xpd, fmt, ...) \
+ printk(KERN_ ## level "%s-%s: %s/%s: " fmt, #level, \
+ THIS_MODULE->name, (xpd)->xbus->busname, (xpd)->xpdname, ## __VA_ARGS__)
+
+#define LINE_PRINTK(level, xpd, pos, fmt, ...) \
+ printk(KERN_ ## level "%s-%s: %s/%s/%d: " fmt, #level, \
+ THIS_MODULE->name, (xpd)->xbus->busname, (xpd)->xpdname, (pos), ## __VA_ARGS__)
+
#define DBG(fmt, ...) \
- ((void)((print_dbg) && printk(KERN_DEBUG "DBG-%s: %s: " fmt, \
- THIS_MODULE->name, __FUNCTION__, ## __VA_ARGS__)))
-#define INFO(fmt, ...) printk(KERN_INFO "INFO-%s: " fmt, THIS_MODULE->name, ## __VA_ARGS__)
-#define NOTICE(fmt, ...) printk(KERN_NOTICE "NOTICE-%s: " fmt, THIS_MODULE->name, ## __VA_ARGS__)
-#define WARN(fmt, ...) printk(KERN_WARNING "WARN-%s: %s: " fmt, THIS_MODULE->name, __FUNCTION__, ## __VA_ARGS__)
-#define ERR(fmt, ...) printk(KERN_ERR "ERR-%s: " fmt, THIS_MODULE->name, ## __VA_ARGS__)
+ ((void)((print_dbg) && PRINTK(DEBUG, "%s: " fmt, __FUNCTION__, ## __VA_ARGS__)))
+#define INFO(fmt, ...) PRINTK(INFO, fmt, ## __VA_ARGS__)
+#define NOTICE(fmt, ...) PRINTK(NOTICE, fmt, ## __VA_ARGS__)
+#define WARNING(fmt, ...) PRINTK(WARNING, fmt, ## __VA_ARGS__)
+#define ERR(fmt, ...) PRINTK(ERR, fmt, ## __VA_ARGS__)
+
+#define XBUS_DBG(xbus, fmt, ...) \
+ ((void)((print_dbg) && XBUS_PRINTK(DEBUG, xbus, "%s: " fmt, __FUNCTION__, ## __VA_ARGS__)))
+#define XBUS_INFO(xbus, fmt, ...) XBUS_PRINTK(INFO, xbus, fmt, ## __VA_ARGS__)
+#define XBUS_NOTICE(xbus, fmt, ...) XBUS_PRINTK(NOTICE, xbus, fmt, ## __VA_ARGS__)
+#define XBUS_ERR(xbus, fmt, ...) XBUS_PRINTK(ERR, xbus, fmt, ## __VA_ARGS__)
+
+#define XPD_DBG(xpd, fmt, ...) \
+ ((void)((print_dbg) && XPD_PRINTK(DEBUG, xpd, "%s: " fmt, __FUNCTION__, ## __VA_ARGS__)))
+#define XPD_INFO(xpd, fmt, ...) XPD_PRINTK(INFO, xpd, fmt, ## __VA_ARGS__)
+#define XPD_NOTICE(xpd, fmt, ...) XPD_PRINTK(NOTICE, xpd, fmt, ## __VA_ARGS__)
+#define XPD_WARNING(xpd, fmt, ...) XPD_PRINTK(WARNING, xpd, fmt, ## __VA_ARGS__)
+#define XPD_ERR(xpd, fmt, ...) XPD_PRINTK(ERR, xpd, fmt, ## __VA_ARGS__)
+
+#define LINE_DBG(xpd, pos, fmt, ...) \
+ ((void)((print_dbg) && LINE_PRINTK(DEBUG, xpd, pos, "%s: " fmt, __FUNCTION__, ## __VA_ARGS__)))
+#define LINE_NOTICE(xpd, pos, fmt, ...) LINE_PRINTK(NOTICE, xpd, pos, fmt, ## __VA_ARGS__)
/*
* Bits for print_dbg