diff options
author | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-08-01 21:33:56 +0000 |
---|---|---|
committer | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-08-01 21:33:56 +0000 |
commit | f83aff263467c62fc8841ed48c472870d4f005b8 (patch) | |
tree | 55a98339a96498bfaa5dcce34f443d0133ed693e /xpp/zap_debug.h | |
parent | c672fbb982ba644e11ab9e5b6d883008b4004100 (diff) |
xpp.r4415:
* 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 (rr4407).
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@2811 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp/zap_debug.h')
-rw-r--r-- | xpp/zap_debug.h | 44 |
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 |