Date: Sun, 5 Nov 2006 17:32:11 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 109289 for review Message-ID: <200611051732.kA5HWBsL028952@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=109289 Change 109289 by sam@sam_ebb on 2006/11/05 17:32:08 o inherit initial debug setting from tunable (as intended) o use device_printf instead of if_printf so debug msgs prior to ifp setup don't crash Affected files ... .. //depot/projects/arm/src/sys/arm/xscale/ixp425/if_npe.c#2 edit Differences ... ==== //depot/projects/arm/src/sys/arm/xscale/ixp425/if_npe.c#2 (text+ko) ==== @@ -194,10 +194,10 @@ 0, "IXP425 NPE network interface debug msgs"); TUNABLE_INT("debug.npe", &npe_debug); #define DPRINTF(sc, fmt, ...) do { \ - if (sc->debug) if_printf(sc->sc_ifp, fmt, __VA_ARGS__); \ + if (sc->debug) device_printf(sc->sc_dev, fmt, __VA_ARGS__); \ } while (0) #define DPRINTFn(n, sc, fmt, ...) do { \ - if (sc->debug >= n) if_printf(sc->sc_ifp, fmt, __VA_ARGS__); \ + if (sc->debug >= n) device_printf(sc->sc_dev, fmt, __VA_ARGS__);\ } while (0) static int @@ -229,6 +229,7 @@ sc->sc_iot = sa->sc_iot; NPE_LOCK_INIT(sc); callout_init_mtx(&sc->tick_ch, &sc->sc_mtx, 0); + sc->debug = npe_debug; sc->sc_npe = ixpnpe_attach(dev); if (sc->sc_npe == NULL) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611051732.kA5HWBsL028952>