From af98feb19ca817b26a34aa7761305c94fed71425 Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Tue, 1 Oct 2002 00:52:58 +0000 Subject: Use if_printf(ifp, "blah") instead of printf("fe%d: blah", ifp->if_unit). A number of functions in this driver still use the unit number in their printouts because they pass the unit directly as a function argument instead of passing a softc or struct ifnet pointer. This should be resolved at a future date. --- sys/dev/fe/if_fe.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'sys/dev/fe') diff --git a/sys/dev/fe/if_fe.c b/sys/dev/fe/if_fe.c index fb2ad57332f1..1cbce782cbc6 100644 --- a/sys/dev/fe/if_fe.c +++ b/sys/dev/fe/if_fe.c @@ -991,11 +991,11 @@ fe_watchdog ( struct ifnet *ifp ) struct fe_softc *sc = (struct fe_softc *)ifp; /* A "debug" message. */ - printf("fe%d: transmission timeout (%d+%d)%s\n", - ifp->if_unit, sc->txb_sched, sc->txb_count, + if_printf(ifp, "transmission timeout (%d+%d)%s\n", + sc->txb_sched, sc->txb_count, (ifp->if_flags & IFF_UP) ? "" : " when down"); if (sc->sc_if.if_opackets == 0 && sc->sc_if.if_ipackets == 0) - printf("fe%d: wrong IRQ setting in config?\n", ifp->if_unit); + if_printf(ifp, "wrong IRQ setting in config?\n"); fe_reset(sc); } @@ -1179,8 +1179,8 @@ fe_start (struct ifnet *ifp) * txb_count is zero if and only if txb_free is same * as txb_size (which represents whole buffer.) */ - printf("fe%d: inconsistent txb variables (%d, %d)\n", - sc->sc_unit, sc->txb_count, sc->txb_free); + if_printf(ifp, "inconsistent txb variables (%d, %d)\n", + sc->txb_count, sc->txb_free); /* * So, what should I do, then? * @@ -1205,8 +1205,8 @@ fe_start (struct ifnet *ifp) * transmitter - should never happen at this point. */ if ((sc->txb_count > 0) && (sc->txb_sched == 0)) { - printf("fe%d: transmitter idle with %d buffered packets\n", - sc->sc_unit, sc->txb_count); + if_printf(ifp, "transmitter idle with %d buffered packets\n", + sc->txb_count); fe_xmit(sc); } -- cgit v1.3