summaryrefslogtreecommitdiff
path: root/xpp/xproto.c
diff options
context:
space:
mode:
authortzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-08-01 22:41:21 +0000
committertzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-08-01 22:41:21 +0000
commit8853eda9e2b26e418f2d3bec412eeb5edafc4604 (patch)
treeb5ff1c8e9f2522db512ccdb16c425d81aa4c3628 /xpp/xproto.c
parentd6799cd73bc7567c3e35aeb80b3b86d2322d194a (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). Merged revisions 2811 via svnmerge from https://origsvn.digium.com/svn/zaptel/branches/1.2 git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@2812 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp/xproto.c')
-rw-r--r--xpp/xproto.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/xpp/xproto.c b/xpp/xproto.c
index 02741e6..052a923 100644
--- a/xpp/xproto.c
+++ b/xpp/xproto.c
@@ -127,8 +127,8 @@ xproto_handler_t xproto_card_handler(const xproto_table_t *table, byte opcode)
void notify_bad_xpd(const char *funcname, xbus_t *xbus, const xpd_addr_t addr, const char *msg)
{
- NOTICE("%s: non-existing address %s(%1d%1d): %s\n",
- funcname, xbus->busname, addr.unit, addr.subunit, msg);
+ XBUS_NOTICE(xbus, "%s: non-existing address (%1d%1d): %s\n",
+ funcname, addr.unit, addr.subunit, msg);
}
int packet_process(xbus_t *xbus, xpacket_t *pack)
@@ -156,8 +156,8 @@ int packet_process(xbus_t *xbus, xpacket_t *pack)
if(!xpd) {
if(printk_ratelimit()) {
- NOTICE("%s: %s from %d%d opcode=0x%02X: no such global command.\n",
- __FUNCTION__, xbus->busname,
+ XBUS_NOTICE(xbus, "%s: from %d%d opcode=0x%02X: no such global command.\n",
+ __FUNCTION__,
pack->addr.unit, pack->addr.subunit, op);
dump_packet("packet_process -- no such global command", pack, 1);
}
@@ -166,18 +166,16 @@ int packet_process(xbus_t *xbus, xpacket_t *pack)
xtable = xproto_table(xpd->type);
if(!xtable) {
if(printk_ratelimit())
- ERR("%s: %s/%s: no protocol table (type=%d)\n",
+ XPD_ERR(xpd, "%s: no protocol table (type=%d)\n",
__FUNCTION__,
- xbus->busname, xpd->xpdname,
xpd->type);
goto out;
}
xe = xproto_card_entry(xtable, op);
if(!xe) {
if(printk_ratelimit()) {
- NOTICE("%s: %s/%s: bad command (type=%d,opcode=0x%x)\n",
+ XPD_NOTICE(xpd, "%s: bad command (type=%d,opcode=0x%x)\n",
__FUNCTION__,
- xbus->busname, xpd->xpdname,
xpd->type, op);
dump_packet("packet_process -- bad command", pack, 1);
}
@@ -219,7 +217,7 @@ int xframe_receive(xbus_t *xbus, xframe_t *xframe)
static int rate_limit;
if((rate_limit++ % 1003) == 0) {
- NOTICE("%s: short xframe\n", xbus->busname);
+ XBUS_NOTICE(xbus, "short xframe\n");
dump_xframe("short xframe", xbus, xframe);
}
goto bad_proto;
@@ -239,11 +237,11 @@ int xframe_receive(xbus_t *xbus, xframe_t *xframe)
len = pack->datalen;
/* Sanity checks */
if(unlikely(is_pcm && pack->opcode != XPROTO_NAME(GLOBAL,PCM_READ) && printk_ratelimit())) {
- NOTICE("%s: Non-PCM packet within a PCM xframe\n", xbus->busname);
+ XBUS_NOTICE(xbus, "Non-PCM packet within a PCM xframe\n");
dump_xframe("In PCM xframe", xbus, xframe);
// goto bad_proto;
} else if(unlikely(!is_pcm && pack->opcode == XPROTO_NAME(GLOBAL,PCM_READ) && printk_ratelimit())) {
- NOTICE("%s: A PCM packet within a Non-PCM xframe\n", xbus->busname);
+ XBUS_NOTICE(xbus, "A PCM packet within a Non-PCM xframe\n");
// goto bad_proto;
}
p += len;
@@ -251,7 +249,7 @@ int xframe_receive(xbus_t *xbus, xframe_t *xframe)
static int rate_limit;
if((rate_limit++ % 1003) == 0) {
- NOTICE("%s: Invalid packet length %d\n", xbus->busname, len);
+ XBUS_NOTICE(xbus, "Invalid packet length %d\n", len);
dump_xframe("BAD LENGTH", xbus, xframe);
}
goto bad_proto;