summaryrefslogtreecommitdiffstats
path: root/sys/dev/sn/if_sn.c
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2002-10-01 00:56:39 +0000
committerbrooks <brooks@FreeBSD.org>2002-10-01 00:56:39 +0000
commita397f7e26bfe5ebccd6acea57bd54ebfaaa4f99f (patch)
treed0870f3e452d3916c8f0415a9896d5efe0598e40 /sys/dev/sn/if_sn.c
parentb8c0848b1518c48f2bc58b676b9f0d54186befd2 (diff)
downloadFreeBSD-src-a397f7e26bfe5ebccd6acea57bd54ebfaaa4f99f.zip
FreeBSD-src-a397f7e26bfe5ebccd6acea57bd54ebfaaa4f99f.tar.gz
Use if_printf(ifp, "blah") instead of printf("sn%d: blah", ifp->if_unit).
Diffstat (limited to 'sys/dev/sn/if_sn.c')
-rw-r--r--sys/dev/sn/if_sn.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/sys/dev/sn/if_sn.c b/sys/dev/sn/if_sn.c
index ed27512..9058bfd 100644
--- a/sys/dev/sn/if_sn.c
+++ b/sys/dev/sn/if_sn.c
@@ -380,8 +380,7 @@ snstart(struct ifnet *ifp)
}
if (sc->pages_wanted != -1) {
splx(s);
- printf("sn%d: snstart() while memory allocation pending\n",
- ifp->if_unit);
+ if_printf(ifp, "snstart() while memory allocation pending\n");
return;
}
startagain:
@@ -408,7 +407,7 @@ startagain:
* them instead?
*/
if (len + pad > ETHER_MAX_LEN - ETHER_CRC_LEN) {
- printf("sn%d: large packet discarded (A)\n", ifp->if_unit);
+ if_printf(ifp, "large packet discarded (A)\n");
++sc->arpcom.ac_if.if_oerrors;
IF_DEQUEUE(&sc->arpcom.ac_if.if_snd, m);
m_freem(m);
@@ -480,7 +479,7 @@ startagain:
packet_no = inb(BASE + ALLOC_RESULT_REG_B);
if (packet_no & ARR_FAILED) {
if (junk++ > 10)
- printf("sn%d: Memory allocation failed\n", ifp->if_unit);
+ if_printf(ifp, "Memory allocation failed\n");
goto startagain;
}
/*
@@ -611,7 +610,7 @@ snresume(struct ifnet *ifp)
*/
m = sc->arpcom.ac_if.if_snd.ifq_head;
if (m == 0) {
- printf("sn%d: snresume() with nothing to send\n", ifp->if_unit);
+ if_printf(ifp, "snresume() with nothing to send\n");
return;
}
/*
@@ -628,7 +627,7 @@ snresume(struct ifnet *ifp)
* them instead?
*/
if (len + pad > ETHER_MAX_LEN - ETHER_CRC_LEN) {
- printf("sn%d: large packet discarded (B)\n", ifp->if_unit);
+ if_printf(ifp, "large packet discarded (B)\n");
++sc->arpcom.ac_if.if_oerrors;
IF_DEQUEUE(&sc->arpcom.ac_if.if_snd, m);
m_freem(m);
@@ -664,7 +663,7 @@ snresume(struct ifnet *ifp)
*/
packet_no = inb(BASE + ALLOC_RESULT_REG_B);
if (packet_no & ARR_FAILED) {
- printf("sn%d: Memory allocation failed. Weird.\n", ifp->if_unit);
+ if_printf(ifp, "Memory allocation failed. Weird.\n");
sc->arpcom.ac_if.if_timer = 1;
goto try_start;
}
@@ -678,7 +677,7 @@ snresume(struct ifnet *ifp)
* memory allocation was initiated.
*/
if (pages_wanted != numPages) {
- printf("sn%d: memory allocation wrong size. Weird.\n", ifp->if_unit);
+ if_printf(ifp, "memory allocation wrong size. Weird.\n");
/*
* If the allocation was the wrong size we simply release the
* memory once it is granted. Wait for the MMU to be un-busy.
OpenPOWER on IntegriCloud