summaryrefslogtreecommitdiff
path: root/xpp/zap_debug.h
diff options
context:
space:
mode:
authortzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-12-18 14:31:07 +0000
committertzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-12-18 14:31:07 +0000
commitcfd61537b47387b0fb5c8228baad6cec16d8f6e6 (patch)
tree108deea65c09c7c273a9b981f8783efcd433eaea /xpp/zap_debug.h
parent4391b4a6ee42bdfd8e097c5ee5485e9eb13f19a0 (diff)
xpp r5151:
* xpd_pri: Basically ready. * PCM synchronization changes: - Each Astribank unit ticks independently. Each with its own PLL. - HOST synchronization is gone. Loading of xpp will no longer cause useless 250 ticks per second if you have no Astribank. - Synchronization from the zaptel sync master requires setting ZAPTEL as sync source (xpp_sync ZAPTEL). * rx_tasklet is now a parameter of the module xpp, rather than of xpp_usb. * New FPGA firmware: 5128 (1151) / 5122 (1141, 1131): - Fixes synchronization issues. - PRI module: E1 should now work. * perl module and utilities: - Modules no longer magically scan system on initialization. - Scanning is by calling explicit methods. - "Serial" has been renamed "Label". It is basically unique, but should be modifieble. - Some basic documentation of zaptel perl modules. * Default sort order of zt_registration is back to SORT_CONNCTOR. * zt_registration proc file now shows the number of span registered to if registered. Try: grep . /proc/xpp/XBUS-*/XPD-*/zt_registration * genzaptelconf: Allow using a custom command instead of /etc/init.d/asterisk to start/stop asterisk. * Fixed the typo "Slagish". git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@3506 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp/zap_debug.h')
-rw-r--r--xpp/zap_debug.h59
1 files changed, 31 insertions, 28 deletions
diff --git a/xpp/zap_debug.h b/xpp/zap_debug.h
index ef96f0e..ae5ee40 100644
--- a/xpp/zap_debug.h
+++ b/xpp/zap_debug.h
@@ -22,47 +22,49 @@
*
*/
+#include <zaptel.h> /* for zt_* defs */
+
/* Debugging Macros */
-#define PRINTK(level, fmt, ...) \
- printk(KERN_ ## level "%s-%s: " fmt, #level, THIS_MODULE->name, ## __VA_ARGS__)
+#define PRINTK(level, category, fmt, ...) \
+ printk(KERN_ ## level "%s%s-%s: " fmt, #level, category, 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 XBUS_PRINTK(level, category, xbus, fmt, ...) \
+ printk(KERN_ ## level "%s%s-%s: %s: " fmt, #level, \
+ category, 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 XPD_PRINTK(level, category, xpd, fmt, ...) \
+ printk(KERN_ ## level "%s%s-%s: %s/%s: " fmt, #level, \
+ category, 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 LINE_PRINTK(level, category, xpd, pos, fmt, ...) \
+ printk(KERN_ ## level "%s%s-%s: %s/%s/%d: " fmt, #level, \
+ category, THIS_MODULE->name, (xpd)->xbus->busname, (xpd)->xpdname, (pos), ## __VA_ARGS__)
#define DBG(bits, fmt, ...) \
- ((void)((print_dbg & (DBG_ ## bits)) && 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__)
+ ((void)((print_dbg & (DBG_ ## bits)) && PRINTK(DEBUG, "-" #bits, "%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(bits, xbus, fmt, ...) \
- ((void)((print_dbg & (DBG_ ## bits)) && 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__)
+ ((void)((print_dbg & (DBG_ ## bits)) && XBUS_PRINTK(DEBUG, "-" #bits, 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(bits, xpd, fmt, ...) \
- ((void)((print_dbg & (DBG_ ## bits)) && 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__)
+ ((void)((print_dbg & (DBG_ ## bits)) && XPD_PRINTK(DEBUG, "-" #bits, 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(bits, xpd, pos, fmt, ...) \
- ((void)((print_dbg & (DBG_ ## bits)) && LINE_PRINTK(DEBUG, xpd, pos, "%s: " fmt, __FUNCTION__, ## __VA_ARGS__)))
-#define LINE_NOTICE(xpd, pos, fmt, ...) LINE_PRINTK(NOTICE, xpd, pos, fmt, ## __VA_ARGS__)
-#define LINE_ERR(xpd, pos, fmt, ...) LINE_PRINTK(ERR, xpd, pos, fmt, ## __VA_ARGS__)
+ ((void)((print_dbg & (DBG_ ## bits)) && LINE_PRINTK(DEBUG, "-" #bits, xpd, pos, "%s: " fmt, __FUNCTION__, ## __VA_ARGS__)))
+#define LINE_NOTICE(xpd, pos, fmt, ...) LINE_PRINTK(NOTICE, "", xpd, pos, fmt, ## __VA_ARGS__)
+#define LINE_ERR(xpd, pos, fmt, ...) LINE_PRINTK(ERR, "", xpd, pos, fmt, ## __VA_ARGS__)
/*
* Bits for print_dbg
@@ -74,6 +76,7 @@
#define DBG_SIGNAL BIT(4)
#define DBG_PROC BIT(5)
#define DBG_REGS BIT(6)
+#define DBG_DEVICES BIT(7) /* instanciation/destruction etc. */
#define DBG_ANY (~0)
void dump_poll(int print_dbg, const char *msg, int poll);