summaryrefslogtreecommitdiff
path: root/xpp/xproto.c
diff options
context:
space:
mode:
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;