firewire: fw-ohci: unify printk prefixes

The messages which can be enabled by fw-ohci's debug module parameter
are changed from KERN_DEBUG to KERN_NOTICE level and uniformly prefixed
with "firewire_ohci: ".  This further simplifies communication with
users when we ask them to capture debug messages.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
This commit is contained in:
Stefan Richter 2008-06-14 14:23:43 +02:00
parent 5cb84067d6
commit 161b96e782

View file

@ -265,27 +265,25 @@ static void log_irqs(u32 evt)
!(evt & OHCI1394_busReset)) !(evt & OHCI1394_busReset))
return; return;
printk(KERN_DEBUG KBUILD_MODNAME ": IRQ " fw_notify("IRQ %08x%s%s%s%s%s%s%s%s%s%s%s%s%s\n", evt,
"%08x%s%s%s%s%s%s%s%s%s%s%s%s%s\n", evt & OHCI1394_selfIDComplete ? " selfID" : "",
evt, evt & OHCI1394_RQPkt ? " AR_req" : "",
evt & OHCI1394_selfIDComplete ? " selfID" : "", evt & OHCI1394_RSPkt ? " AR_resp" : "",
evt & OHCI1394_RQPkt ? " AR_req" : "", evt & OHCI1394_reqTxComplete ? " AT_req" : "",
evt & OHCI1394_RSPkt ? " AR_resp" : "", evt & OHCI1394_respTxComplete ? " AT_resp" : "",
evt & OHCI1394_reqTxComplete ? " AT_req" : "", evt & OHCI1394_isochRx ? " IR" : "",
evt & OHCI1394_respTxComplete ? " AT_resp" : "", evt & OHCI1394_isochTx ? " IT" : "",
evt & OHCI1394_isochRx ? " IR" : "", evt & OHCI1394_postedWriteErr ? " postedWriteErr" : "",
evt & OHCI1394_isochTx ? " IT" : "", evt & OHCI1394_cycleTooLong ? " cycleTooLong" : "",
evt & OHCI1394_postedWriteErr ? " postedWriteErr" : "", evt & OHCI1394_cycle64Seconds ? " cycle64Seconds" : "",
evt & OHCI1394_cycleTooLong ? " cycleTooLong" : "", evt & OHCI1394_regAccessFail ? " regAccessFail" : "",
evt & OHCI1394_cycle64Seconds ? " cycle64Seconds" : "", evt & OHCI1394_busReset ? " busReset" : "",
evt & OHCI1394_regAccessFail ? " regAccessFail" : "", evt & ~(OHCI1394_selfIDComplete | OHCI1394_RQPkt |
evt & OHCI1394_busReset ? " busReset" : "", OHCI1394_RSPkt | OHCI1394_reqTxComplete |
evt & ~(OHCI1394_selfIDComplete | OHCI1394_RQPkt | OHCI1394_respTxComplete | OHCI1394_isochRx |
OHCI1394_RSPkt | OHCI1394_reqTxComplete | OHCI1394_isochTx | OHCI1394_postedWriteErr |
OHCI1394_respTxComplete | OHCI1394_isochRx | OHCI1394_cycleTooLong | OHCI1394_cycle64Seconds |
OHCI1394_isochTx | OHCI1394_postedWriteErr | OHCI1394_regAccessFail | OHCI1394_busReset)
OHCI1394_cycleTooLong | OHCI1394_cycle64Seconds |
OHCI1394_regAccessFail | OHCI1394_busReset)
? " ?" : ""); ? " ?" : "");
} }
@ -308,23 +306,22 @@ static void log_selfids(int node_id, int generation, int self_id_count, u32 *s)
if (likely(!(param_debug & OHCI_PARAM_DEBUG_SELFIDS))) if (likely(!(param_debug & OHCI_PARAM_DEBUG_SELFIDS)))
return; return;
printk(KERN_DEBUG KBUILD_MODNAME ": %d selfIDs, generation %d, " fw_notify("%d selfIDs, generation %d, local node ID %04x\n",
"local node ID %04x\n", self_id_count, generation, node_id); self_id_count, generation, node_id);
for (; self_id_count--; ++s) for (; self_id_count--; ++s)
if ((*s & 1 << 23) == 0) if ((*s & 1 << 23) == 0)
printk(KERN_DEBUG "selfID 0: %08x, phy %d [%c%c%c] " fw_notify("selfID 0: %08x, phy %d [%c%c%c] "
"%s gc=%d %s %s%s%s\n", "%s gc=%d %s %s%s%s\n",
*s, *s >> 24 & 63, _p(s, 6), _p(s, 4), _p(s, 2), *s, *s >> 24 & 63, _p(s, 6), _p(s, 4), _p(s, 2),
speed[*s >> 14 & 3], *s >> 16 & 63, speed[*s >> 14 & 3], *s >> 16 & 63,
power[*s >> 8 & 7], *s >> 22 & 1 ? "L" : "", power[*s >> 8 & 7], *s >> 22 & 1 ? "L" : "",
*s >> 11 & 1 ? "c" : "", *s & 2 ? "i" : ""); *s >> 11 & 1 ? "c" : "", *s & 2 ? "i" : "");
else else
printk(KERN_DEBUG "selfID n: %08x, phy %d " fw_notify("selfID n: %08x, phy %d [%c%c%c%c%c%c%c%c]\n",
"[%c%c%c%c%c%c%c%c]\n", *s, *s >> 24 & 63,
*s, *s >> 24 & 63, _p(s, 16), _p(s, 14), _p(s, 12), _p(s, 10),
_p(s, 16), _p(s, 14), _p(s, 12), _p(s, 10), _p(s, 8), _p(s, 6), _p(s, 4), _p(s, 2));
_p(s, 8), _p(s, 6), _p(s, 4), _p(s, 2));
} }
static const char *evts[] = { static const char *evts[] = {
@ -373,15 +370,14 @@ static void log_ar_at_event(char dir, int speed, u32 *header, int evt)
evt = 0x1f; evt = 0x1f;
if (evt == OHCI1394_evt_bus_reset) { if (evt == OHCI1394_evt_bus_reset) {
printk(KERN_DEBUG "A%c evt_bus_reset, generation %d\n", fw_notify("A%c evt_bus_reset, generation %d\n",
dir, (header[2] >> 16) & 0xff); dir, (header[2] >> 16) & 0xff);
return; return;
} }
if (header[0] == ~header[1]) { if (header[0] == ~header[1]) {
printk(KERN_DEBUG "A%c %s, %s, %08x\n", fw_notify("A%c %s, %s, %08x\n",
dir, evts[evt], phys[header[0] >> 30 & 0x3], dir, evts[evt], phys[header[0] >> 30 & 0x3], header[0]);
header[0]);
return; return;
} }
@ -400,24 +396,23 @@ static void log_ar_at_event(char dir, int speed, u32 *header, int evt)
switch (tcode) { switch (tcode) {
case 0xe: case 0xa: case 0xe: case 0xa:
printk(KERN_DEBUG "A%c %s, %s\n", fw_notify("A%c %s, %s\n", dir, evts[evt], tcodes[tcode]);
dir, evts[evt], tcodes[tcode]);
break; break;
case 0x0: case 0x1: case 0x4: case 0x5: case 0x9: case 0x0: case 0x1: case 0x4: case 0x5: case 0x9:
printk(KERN_DEBUG "A%c spd %x tl %02x, " fw_notify("A%c spd %x tl %02x, "
"%04x -> %04x, %s, " "%04x -> %04x, %s, "
"%s, %04x%08x%s\n", "%s, %04x%08x%s\n",
dir, speed, header[0] >> 10 & 0x3f, dir, speed, header[0] >> 10 & 0x3f,
header[1] >> 16, header[0] >> 16, evts[evt], header[1] >> 16, header[0] >> 16, evts[evt],
tcodes[tcode], header[1] & 0xffff, header[2], specific); tcodes[tcode], header[1] & 0xffff, header[2], specific);
break; break;
default: default:
printk(KERN_DEBUG "A%c spd %x tl %02x, " fw_notify("A%c spd %x tl %02x, "
"%04x -> %04x, %s, " "%04x -> %04x, %s, "
"%s%s\n", "%s%s\n",
dir, speed, header[0] >> 10 & 0x3f, dir, speed, header[0] >> 10 & 0x3f,
header[1] >> 16, header[0] >> 16, evts[evt], header[1] >> 16, header[0] >> 16, evts[evt],
tcodes[tcode], specific); tcodes[tcode], specific);
} }
} }