From owner-p4-projects@FreeBSD.ORG Sun Nov 5 17:32:43 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9E06416A4A7; Sun, 5 Nov 2006 17:32:43 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 305C016A40F for ; Sun, 5 Nov 2006 17:32:43 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 431AE43D8B for ; Sun, 5 Nov 2006 17:32:25 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kA5HWBBs028955 for ; Sun, 5 Nov 2006 17:32:11 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kA5HWBsL028952 for perforce@freebsd.org; Sun, 5 Nov 2006 17:32:11 GMT (envelope-from sam@freebsd.org) Date: Sun, 5 Nov 2006 17:32:11 GMT Message-Id: <200611051732.kA5HWBsL028952@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 109289 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Nov 2006 17:32:43 -0000 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) {