summaryrefslogtreecommitdiffstats
path: root/sys/dev/fxp
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2003-09-05 22:37:31 +0000
committersam <sam@FreeBSD.org>2003-09-05 22:37:31 +0000
commitd1c253ce2300f067eb3c66f503932b0b7b05a583 (patch)
tree5042ddc41471da372acc6c85ef572857357b33c0 /sys/dev/fxp
parent617e17d9977073443c46b78caadfdd065ab29ab6 (diff)
downloadFreeBSD-src-d1c253ce2300f067eb3c66f503932b0b7b05a583.zip
FreeBSD-src-d1c253ce2300f067eb3c66f503932b0b7b05a583.tar.gz
change timeout to be MPSAFE
Sponsored by: FreeBSD Foundation
Diffstat (limited to 'sys/dev/fxp')
-rw-r--r--sys/dev/fxp/if_fxp.c8
-rw-r--r--sys/dev/fxp/if_fxpvar.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c
index 4c7514f..547080e 100644
--- a/sys/dev/fxp/if_fxp.c
+++ b/sys/dev/fxp/if_fxp.c
@@ -412,7 +412,7 @@ fxp_attach(device_t dev)
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);
@@ -1883,7 +1883,7 @@ fxp_tick(void *xsc)
/*
* 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);
}
@@ -1908,7 +1908,7 @@ fxp_stop(struct fxp_softc *sc)
/*
* Cancel stats updater.
*/
- untimeout(fxp_tick, sc, sc->stat_ch);
+ callout_stop(&sc->stat_ch);
/*
* Issue software reset, which also unloads the microcode.
@@ -2239,7 +2239,7 @@ fxp_init_body(struct fxp_softc *sc)
/*
* Start stats updater.
*/
- sc->stat_ch = timeout(fxp_tick, sc, hz);
+ callout_reset(&sc->stat_ch, hz, fxp_tick, sc);
splx(s);
}
diff --git a/sys/dev/fxp/if_fxpvar.h b/sys/dev/fxp/if_fxpvar.h
index dd52c07..522d3c8 100644
--- a/sys/dev/fxp/if_fxpvar.h
+++ b/sys/dev/fxp/if_fxpvar.h
@@ -174,7 +174,7 @@ struct fxp_softc {
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 */
OpenPOWER on IntegriCloud