summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorsbruno <sbruno@FreeBSD.org>2009-02-12 03:26:05 +0000
committersbruno <sbruno@FreeBSD.org>2009-02-12 03:26:05 +0000
commit2a2a8639b113f07771089ec4733cafa8639b5046 (patch)
tree98e8073cf39219e956f25a76d169fa6f7e05c914 /sys
parented8ca37ec7e78a5b87940e4c15ef009308ec8e0e (diff)
downloadFreeBSD-src-2a2a8639b113f07771089ec4733cafa8639b5046.zip
FreeBSD-src-2a2a8639b113f07771089ec4733cafa8639b5046.tar.gz
Enhance debug messages and attempt to unify them into one format where possible.
Reviewed by: scottl
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/firewire/fwohci.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/sys/dev/firewire/fwohci.c b/sys/dev/firewire/fwohci.c
index 258ba1b..7e7910f 100644
--- a/sys/dev/firewire/fwohci.c
+++ b/sys/dev/firewire/fwohci.c
@@ -306,8 +306,8 @@ fwohci_set_bus_manager(struct firewire_comm *fc, u_int node)
if((bm & 0x3f) == 0x3f)
bm = node;
if (firewire_debug)
- device_printf(sc->fc.dev,
- "fw_set_bus_manager: %d->%d (loop=%d)\n", bm, node, i);
+ device_printf(sc->fc.dev, "%s: %d->%d (loop=%d)\n",
+ __func__, bm, node, i);
return(bm);
}
@@ -332,7 +332,7 @@ again:
}
if(i >= MAX_RETRY) {
if (firewire_debug)
- device_printf(sc->fc.dev, "phy read failed(1).\n");
+ device_printf(sc->fc.dev, "%s: failed(1).\n", __func__);
if (++retry < MAX_RETRY) {
DELAY(100);
goto again;
@@ -343,15 +343,16 @@ again:
if ((stat & OHCI_INT_REG_FAIL) != 0 ||
((fun >> PHYDEV_REGADDR) & 0xf) != addr) {
if (firewire_debug)
- device_printf(sc->fc.dev, "phy read failed(2).\n");
+ device_printf(sc->fc.dev, "%s: failed(2).\n", __func__);
if (++retry < MAX_RETRY) {
DELAY(100);
goto again;
}
}
- if (firewire_debug || retry >= MAX_RETRY)
+ if (firewire_debug > 1 || retry >= MAX_RETRY)
device_printf(sc->fc.dev,
- "fwphy_rddata: 0x%x loop=%d, retry=%d\n", addr, i, retry);
+ "%s:: 0x%x loop=%d, retry=%d\n",
+ __func__, addr, i, retry);
#undef MAX_RETRY
return((fun >> PHYDEV_RDDATA )& 0xff);
}
@@ -1848,7 +1849,7 @@ fwohci_intr_core(struct fwohci_softc *sc, uint32_t stat, int count)
/* Disable bus reset interrupt until sid recv. */
OWRITE(sc, FWOHCI_INTMASKCLR, OHCI_INT_PHY_BUS_R);
- device_printf(fc->dev, "BUS reset\n");
+ device_printf(fc->dev, "%s: BUS reset\n", __func__);
OWRITE(sc, FWOHCI_INTMASKCLR, OHCI_INT_CYC_LOST);
OWRITE(sc, OHCI_LNKCTLCLR, OHCI_CNTL_CYCSRC);
@@ -1885,10 +1886,11 @@ fwohci_intr_core(struct fwohci_softc *sc, uint32_t stat, int count)
plen = OREAD(sc, OHCI_SID_CNT);
fc->nodeid = node_id & 0x3f;
- device_printf(fc->dev, "node_id=0x%08x, SelfID Count=%d, ",
- fc->nodeid, (plen >> 16) & 0xff);
+ device_printf(fc->dev, "%s: node_id=0x%08x, SelfID Count=%d, ",
+ __func__, fc->nodeid, (plen >> 16) & 0xff);
if (!(node_id & OHCI_NODE_VALID)) {
- printf("Bus reset failure\n");
+ device_printf(fc->dev, "%s: Bus reset failure\n",
+ __func__);
goto sidout;
}
OpenPOWER on IntegriCloud