Date: Thu, 14 Aug 2003 15:04:42 -0700 (PDT) From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 36141 for review Message-ID: <200308142204.h7EM4gm6084678@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200308142204.h7EM4gm6084678>