From owner-p4-projects@FreeBSD.ORG Thu Aug 14 15:04:43 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4C5C937B404; Thu, 14 Aug 2003 15:04:43 -0700 (PDT) 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 DE64637B401 for ; Thu, 14 Aug 2003 15:04:42 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E57E43FA3 for ; Thu, 14 Aug 2003 15:04:42 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h7EM4g0U084681 for ; Thu, 14 Aug 2003 15:04:42 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h7EM4gm6084678 for perforce@freebsd.org; Thu, 14 Aug 2003 15:04:42 -0700 (PDT) Date: Thu, 14 Aug 2003 15:04:42 -0700 (PDT) Message-Id: <200308142204.h7EM4gm6084678@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 Subject: PERFORCE change 36141 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2003 22:04:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=36141 Change 36141 by sam@sam_ebb on 2003/08/14 15:04:21 re-enable MPSAFE callouts (somehow lost) Affected files ... .. //depot/projects/netperf/sys/dev/fxp/if_fxp.c#5 edit .. //depot/projects/netperf/sys/dev/fxp/if_fxpvar.h#2 edit Differences ... ==== //depot/projects/netperf/sys/dev/fxp/if_fxp.c#5 (text+ko) ==== @@ -409,7 +409,7 @@ int s, ipcbxmit_disable; sc->dev = dev; - callout_handle_init(&sc->stat_ch); + callout_init(&sc->stat_ch, CALLOUT_MPSAFE); sysctl_ctx_init(&sc->sysctl_ctx); mtx_init(&sc->sc_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, MTX_DEF); @@ -1877,7 +1877,7 @@ /* * Schedule another timeout one second from now. */ - sc->stat_ch = timeout(fxp_tick, sc, hz); + callout_reset(&sc->stat_ch, hz, fxp_tick, sc); FXP_UNLOCK(sc); splx(s); } @@ -1902,7 +1902,7 @@ /* * Cancel stats updater. */ - untimeout(fxp_tick, sc, sc->stat_ch); + callout_stop(&sc->stat_ch); /* * Issue software reset, which also unloads the microcode. @@ -2233,7 +2233,7 @@ /* * Start stats updater. */ - sc->stat_ch = timeout(fxp_tick, sc, hz); + callout_reset(&sc->stat_ch, hz, fxp_tick, sc); splx(s); } ==== //depot/projects/netperf/sys/dev/fxp/if_fxpvar.h#2 (text+ko) ==== @@ -174,7 +174,7 @@ struct fxp_stats *fxp_stats; /* Pointer to interface stats */ u_int32_t stats_addr; /* DMA address of the stats structure */ int rx_idle_secs; /* # of seconds RX has been idle */ - struct callout_handle stat_ch; /* Handle for canceling our stat timeout */ + struct callout stat_ch; /* stat callout */ struct fxp_cb_mcs *mcsp; /* Pointer to mcast setup descriptor */ u_int32_t mcs_addr; /* DMA address of the multicast cmd */ struct ifmedia sc_media; /* media information */