diff options
Diffstat (limited to 'sys')
43 files changed, 136 insertions, 136 deletions
diff --git a/sys/arch/hp300/dev/apci.c b/sys/arch/hp300/dev/apci.c index b470208a919..f15b54817fa 100644 --- a/sys/arch/hp300/dev/apci.c +++ b/sys/arch/hp300/dev/apci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apci.c,v 1.32 2008/06/26 05:42:10 ray Exp $ */ +/* $OpenBSD: apci.c,v 1.33 2008/10/15 19:12:19 blambert Exp $ */ /* $NetBSD: apci.c,v 1.9 2000/11/02 00:35:05 eeh Exp $ */ /*- @@ -373,7 +373,7 @@ apciopen(dev, flag, mode, p) if (error == 0) { /* clear errors, start timeout */ sc->sc_ferr = sc->sc_perr = sc->sc_oflow = sc->sc_toterr = 0; - timeout_add(&sc->sc_timeout, hz); + timeout_add_sec(&sc->sc_timeout, 1); } return (error); @@ -860,7 +860,7 @@ apcitimeout(arg) sc->sc_dev.dv_xname, ferr, perr, oflow, sc->sc_toterr); } - timeout_add(&sc->sc_timeout, hz); + timeout_add_sec(&sc->sc_timeout, 1); } /* diff --git a/sys/arch/hp300/dev/dma.c b/sys/arch/hp300/dev/dma.c index 189dfc173ea..33a9551ba68 100644 --- a/sys/arch/hp300/dev/dma.c +++ b/sys/arch/hp300/dev/dma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dma.c,v 1.19 2008/07/18 21:39:52 miod Exp $ */ +/* $OpenBSD: dma.c,v 1.20 2008/10/15 19:12:19 blambert Exp $ */ /* $NetBSD: dma.c,v 1.19 1997/05/05 21:02:39 thorpej Exp $ */ /* @@ -178,7 +178,7 @@ dmainit() #ifdef DEBUG /* make sure timeout is really not needed */ timeout_set(&sc->sc_timeout, dmatimeout, sc); - timeout_add(&sc->sc_timeout, 30 * hz); + timeout_add_sec(&sc->sc_timeout, 30); #endif printf("98620%c, 2 channels, %d bit DMA\n", @@ -567,6 +567,6 @@ dmatimeout(void *arg) } splx(s); } - timeout_add(&sc->sc_timeout, 30 * hz); + timeout_add_sec(&sc->sc_timeout, 30); } #endif diff --git a/sys/arch/hp300/dev/hd.c b/sys/arch/hp300/dev/hd.c index 389d21d4d25..e5e2e2f01ee 100644 --- a/sys/arch/hp300/dev/hd.c +++ b/sys/arch/hp300/dev/hd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hd.c,v 1.53 2007/06/21 20:23:07 miod Exp $ */ +/* $OpenBSD: hd.c,v 1.54 2008/10/15 19:12:20 blambert Exp $ */ /* $NetBSD: rd.c,v 1.33 1997/07/10 18:14:08 kleink Exp $ */ /* @@ -1036,7 +1036,7 @@ hderror(unit) rs->sc_stats.hdtimeouts++; #endif hpibfree(rs->sc_dev.dv_parent, &rs->sc_hq); - timeout_add(&rs->sc_timeout, hdtimo * hz); + timeout_add_sec(&rs->sc_timeout, hdtimo); return(0); } /* diff --git a/sys/arch/hppa/gsc/gsckbc.c b/sys/arch/hppa/gsc/gsckbc.c index 0ed5d9b220d..00bd635675e 100644 --- a/sys/arch/hppa/gsc/gsckbc.c +++ b/sys/arch/hppa/gsc/gsckbc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gsckbc.c,v 1.11 2008/07/16 16:32:08 miod Exp $ */ +/* $OpenBSD: gsckbc.c,v 1.12 2008/10/15 19:12:19 blambert Exp $ */ /* * Copyright (c) 2003, Miodrag Vallat. * All rights reserved. @@ -953,7 +953,7 @@ pckbc_enqueue_cmd(self, slot, cmd, len, responselen, sync, respbuf) } else res = nc->status; } else - timeout_add(&t->t_cleanup, hz); + timeout_add_sec(&t->t_cleanup, 1); if (sync) { if (respbuf) diff --git a/sys/arch/macppc/dev/if_bm.c b/sys/arch/macppc/dev/if_bm.c index eb0d056eb56..d47a3251c0d 100644 --- a/sys/arch/macppc/dev/if_bm.c +++ b/sys/arch/macppc/dev/if_bm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bm.c,v 1.23 2008/10/02 20:21:13 brad Exp $ */ +/* $OpenBSD: if_bm.c,v 1.24 2008/10/15 19:12:19 blambert Exp $ */ /* $NetBSD: if_bm.c,v 1.1 1999/01/01 01:27:52 tsubai Exp $ */ /*- @@ -982,5 +982,5 @@ bmac_mii_tick(void *v) mii_tick(&sc->sc_mii); splx(s); - timeout_add(&sc->sc_tick_ch, hz); + timeout_add_sec(&sc->sc_tick_ch, 1); } diff --git a/sys/arch/macppc/dev/mesh.c b/sys/arch/macppc/dev/mesh.c index 9a235810449..3c01138c614 100644 --- a/sys/arch/macppc/dev/mesh.c +++ b/sys/arch/macppc/dev/mesh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mesh.c,v 1.19 2008/07/30 18:08:03 miod Exp $ */ +/* $OpenBSD: mesh.c,v 1.20 2008/10/15 19:12:19 blambert Exp $ */ /* $NetBSD: mesh.c,v 1.1 1999/02/19 13:06:03 tsubai Exp $ */ /*- @@ -617,7 +617,7 @@ mesh_select(struct mesh_softc *sc, struct mesh_scb *scb) sc->sc_prevphase = MESH_SELECTING; sc->sc_nextstate = MESH_IDENTIFY; - timeout_add(&sc->sc_tmo, 10*hz); + timeout_add_sec(&sc->sc_tmo, 10); } void diff --git a/sys/arch/sgi/dev/if_mec.c b/sys/arch/sgi/dev/if_mec.c index 064543c0f1e..f973bf09cb9 100644 --- a/sys/arch/sgi/dev/if_mec.c +++ b/sys/arch/sgi/dev/if_mec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mec.c,v 1.16 2008/10/02 20:21:13 brad Exp $ */ +/* $OpenBSD: if_mec.c,v 1.17 2008/10/15 19:12:19 blambert Exp $ */ /* $NetBSD: if_mec_mace.c,v 1.5 2004/08/01 06:36:36 tsutsui Exp $ */ /* @@ -679,7 +679,7 @@ mec_init(struct ifnet *ifp) MEC_DMA_TX_DMA_ENABLE | /* MEC_DMA_TX_INT_ENABLE | */ MEC_DMA_RX_DMA_ENABLE | MEC_DMA_RX_INT_ENABLE); - timeout_add(&sc->sc_tick_ch, hz); + timeout_add_sec(&sc->sc_tick_ch, 1); ifp->if_flags |= IFF_RUNNING; ifp->if_flags &= ~IFF_OACTIVE; @@ -1131,7 +1131,7 @@ mec_tick(void *arg) mii_tick(&sc->sc_mii); splx(s); - timeout_add(&sc->sc_tick_ch, hz); + timeout_add_sec(&sc->sc_tick_ch, 1); } void diff --git a/sys/arch/sgi/dev/mkbc.c b/sys/arch/sgi/dev/mkbc.c index 249a8fba3a2..ca0bfb40f34 100644 --- a/sys/arch/sgi/dev/mkbc.c +++ b/sys/arch/sgi/dev/mkbc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mkbc.c,v 1.7 2008/06/14 18:29:52 miod Exp $ */ +/* $OpenBSD: mkbc.c,v 1.8 2008/10/15 19:12:19 blambert Exp $ */ /* * Copyright (c) 2006, 2007, Joel Sing @@ -323,7 +323,7 @@ mkbcintr_internal(struct pckbc_internal *t, struct pckbc_softc *sc) /* Reschedule timeout further into the idle times. */ if (timeout_pending(&t->t_poll)) - timeout_add(&t->t_poll, hz); + timeout_add_sec(&t->t_poll, 1); /* * Need to check both "slots" since interrupt could be from @@ -754,7 +754,7 @@ pckbc_enqueue_cmd(pckbc_tag_t self, pckbc_slot_t slot, u_char *cmd, int len, } else res = nc->status; } else - timeout_add(&t->t_cleanup, hz); + timeout_add_sec(&t->t_cleanup, 1); if (sync) { if (respbuf) @@ -799,7 +799,7 @@ pckbc_set_inputhandler(pckbc_tag_t self, pckbc_slot_t slot, pckbc_inputfcn func, sc->subname[slot] = name; if (mkbc_console && slot == PCKBC_KBD_SLOT) - timeout_add(&t->t_poll, hz); + timeout_add_sec(&t->t_poll, 1); } void @@ -831,7 +831,7 @@ pckbc_slot_enable(pckbc_tag_t self, pckbc_slot_t slot, int on) if (slot == PCKBC_KBD_SLOT) { if (on) - timeout_add(&t->t_poll, hz); + timeout_add_sec(&t->t_poll, 1); else timeout_del(&t->t_poll); } @@ -924,6 +924,6 @@ mkbc_poll(void *self) s = spltty(); (void)mkbcintr_internal(t, t->t_sc); - timeout_add(&t->t_poll, hz); + timeout_add_sec(&t->t_poll, 1); splx(s); } diff --git a/sys/arch/sh/dev/scif.c b/sys/arch/sh/dev/scif.c index 30aaec824d0..04aaf0607c1 100644 --- a/sys/arch/sh/dev/scif.c +++ b/sys/arch/sh/dev/scif.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scif.c,v 1.6 2008/06/27 06:03:08 ray Exp $ */ +/* $OpenBSD: scif.c,v 1.7 2008/10/15 19:12:19 blambert Exp $ */ /* $NetBSD: scif.c,v 1.47 2006/07/23 22:06:06 ad Exp $ */ /*- @@ -980,7 +980,7 @@ scif_rxsoft(struct scif_softc *sc, struct tty *tp) if (cc == scif_rbuf_size) { sc->sc_floods++; if (sc->sc_errors++ == 0) - timeout_add(&sc->sc_diag_tmo, 60 * hz); + timeout_add_sec(&sc->sc_diag_tmo, 60); } while (cc) { diff --git a/sys/arch/socppc/dev/if_tsec.c b/sys/arch/socppc/dev/if_tsec.c index 170eb68e2e4..6ac28f5fd99 100644 --- a/sys/arch/socppc/dev/if_tsec.c +++ b/sys/arch/socppc/dev/if_tsec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tsec.c,v 1.12 2008/10/02 20:21:13 brad Exp $ */ +/* $OpenBSD: if_tsec.c,v 1.13 2008/10/15 19:12:19 blambert Exp $ */ /* * Copyright (c) 2008 Mark Kettenis @@ -627,7 +627,7 @@ tsec_tick(void *arg) mii_tick(&sc->sc_mii); splx(s); - timeout_add(&sc->sc_tick, hz); + timeout_add_sec(&sc->sc_tick, 1); } int @@ -928,7 +928,7 @@ tsec_up(struct tsec_softc *sc) TSEC_IMASK_TXBEN | TSEC_IMASK_TXFEN | TSEC_IMASK_RXBEN | TSEC_IMASK_RXFEN); - timeout_add(&sc->sc_tick, hz); + timeout_add_sec(&sc->sc_tick, 1); } void diff --git a/sys/arch/sparc/dev/be.c b/sys/arch/sparc/dev/be.c index 9cf5a694449..ed47a39d63a 100644 --- a/sys/arch/sparc/dev/be.c +++ b/sys/arch/sparc/dev/be.c @@ -1,4 +1,4 @@ -/* $OpenBSD: be.c,v 1.41 2008/10/02 20:21:13 brad Exp $ */ +/* $OpenBSD: be.c,v 1.42 2008/10/15 19:12:19 blambert Exp $ */ /* * Copyright (c) 1998 Theo de Raadt and Jason L. Wright. @@ -557,7 +557,7 @@ betick(vsc) br->lt_ctr = 0; bestart(ifp); splx(s); - timeout_add(&sc->sc_tick, hz); + timeout_add_sec(&sc->sc_tick, 1); } int @@ -749,7 +749,7 @@ beinit(sc) ifp->if_flags &= ~IFF_OACTIVE; splx(s); - timeout_add(&sc->sc_tick, hz); + timeout_add_sec(&sc->sc_tick, 1); bestart(ifp); } diff --git a/sys/arch/sparc/dev/fd.c b/sys/arch/sparc/dev/fd.c index 6f0cd599152..1cb6a5c2e34 100644 --- a/sys/arch/sparc/dev/fd.c +++ b/sys/arch/sparc/dev/fd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fd.c,v 1.62 2008/06/26 05:42:13 ray Exp $ */ +/* $OpenBSD: fd.c,v 1.63 2008/10/15 19:12:19 blambert Exp $ */ /* $NetBSD: fd.c,v 1.51 1997/05/24 20:16:19 pk Exp $ */ /*- @@ -811,7 +811,7 @@ fdfinish(fd, bp) biodone(bp); /* turn off motor 5s from now */ - timeout_add(&fd->fd_motor_off_to, 5 * hz); + timeout_add_sec(&fd->fd_motor_off_to, 5); fdc->sc_state = DEVIDLE; } @@ -1359,7 +1359,7 @@ loop: fd->sc_dk.dk_seek++; disk_busy(&fd->sc_dk); - timeout_add(&fdc->fdctimeout_to, 4 * hz); + timeout_add_sec(&fdc->fdctimeout_to, 4); /* specify command */ FDC_WRFIFO(fdc, NE7CMD_SPECIFY); @@ -1421,7 +1421,7 @@ loop: disk_busy(&fd->sc_dk); /* allow 3 seconds for operation */ - timeout_add(&fdc->fdctimeout_to, 3 * hz); + timeout_add_sec(&fdc->fdctimeout_to, 3); if (finfo != NULL) { /* formatting */ @@ -1604,7 +1604,7 @@ loop: fdc->sc_state = RECALWAIT; fdc->sc_itask = FDC_ITASK_SENSEI; fdc->sc_nstat = 0; - timeout_add(&fdc->fdctimeout_to, 5 * hz); + timeout_add_sec(&fdc->fdctimeout_to, 5); /* recalibrate function */ FDC_WRFIFO(fdc, NE7CMD_RECAL); FDC_WRFIFO(fdc, fd->sc_drive); diff --git a/sys/arch/sparc/dev/z8530kbd.c b/sys/arch/sparc/dev/z8530kbd.c index 5c1aff82061..0f275b93c75 100644 --- a/sys/arch/sparc/dev/z8530kbd.c +++ b/sys/arch/sparc/dev/z8530kbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: z8530kbd.c,v 1.9 2007/05/25 21:27:15 krw Exp $ */ +/* $OpenBSD: z8530kbd.c,v 1.10 2008/10/15 19:12:19 blambert Exp $ */ /* $NetBSD: z8530tty.c,v 1.77 2001/05/30 15:24:24 lukem Exp $ */ /*- @@ -949,7 +949,7 @@ zskbd_rxsoft(zst) if (cc == zskbd_rbuf_size) { zst->zst_floods++; if (zst->zst_errors++ == 0) - timeout_add(&zst->zst_diag_ch, 60 * hz); + timeout_add_sec(&zst->zst_diag_ch, 60); } while (cc) { @@ -959,7 +959,7 @@ zskbd_rxsoft(zst) if (ISSET(rr1, ZSRR1_DO)) { zst->zst_overflows++; if (zst->zst_errors++ == 0) - timeout_add(&zst->zst_diag_ch, 60 * hz); + timeout_add_sec(&zst->zst_diag_ch, 60); } if (ISSET(rr1, ZSRR1_FE)) SET(code, TTY_FE); diff --git a/sys/arch/sparc/dev/z8530tty.c b/sys/arch/sparc/dev/z8530tty.c index 638e423e169..83d7da7d24d 100644 --- a/sys/arch/sparc/dev/z8530tty.c +++ b/sys/arch/sparc/dev/z8530tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: z8530tty.c,v 1.9 2008/03/01 17:56:42 kettenis Exp $ */ +/* $OpenBSD: z8530tty.c,v 1.10 2008/10/15 19:12:19 blambert Exp $ */ /* $NetBSD: z8530tty.c,v 1.13 1996/10/16 20:42:14 gwr Exp $ */ /*- @@ -1463,7 +1463,7 @@ zstty_rxsoft(zst, tp) if (cc == zstty_rbuf_size) { zst->zst_floods++; if (zst->zst_errors++ == 0) - timeout_add(&zst->zst_diag_ch, 60 * hz); + timeout_add_sec(&zst->zst_diag_ch, 60); } /* If not yet open, drop the entire buffer content here */ @@ -1480,7 +1480,7 @@ zstty_rxsoft(zst, tp) if (ISSET(rr1, ZSRR1_DO)) { zst->zst_overflows++; if (zst->zst_errors++ == 0) - timeout_add(&zst->zst_diag_ch, 60 * hz); + timeout_add_sec(&zst->zst_diag_ch, 60); } if (ISSET(rr1, ZSRR1_FE)) SET(code, TTY_FE); diff --git a/sys/arch/sparc64/dev/fd.c b/sys/arch/sparc64/dev/fd.c index 452e0181d85..4cd37048dcd 100644 --- a/sys/arch/sparc64/dev/fd.c +++ b/sys/arch/sparc64/dev/fd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fd.c,v 1.25 2008/06/26 05:42:13 ray Exp $ */ +/* $OpenBSD: fd.c,v 1.26 2008/10/15 19:12:19 blambert Exp $ */ /* $NetBSD: fd.c,v 1.112 2003/08/07 16:29:35 agc Exp $ */ /*- @@ -811,7 +811,7 @@ fdfinish(fd, bp) biodone(bp); /* turn off motor 5s from now */ - timeout_add(&fd->sc_motoroff_to, 5 * hz); + timeout_add_sec(&fd->sc_motoroff_to, 5); fdc->sc_state = DEVIDLE; } @@ -1373,7 +1373,7 @@ loop: fd->sc_dk.dk_seek++; disk_busy(&fd->sc_dk); - timeout_add(&fdc->fdctimeout_to, 4 * hz); + timeout_add_sec(&fdc->fdctimeout_to, 4); /* specify command */ FDC_WRFIFO(fdc, NE7CMD_SPECIFY); @@ -1395,7 +1395,7 @@ loop: * followed by a recalibrate. */ disk_busy(&fd->sc_dk); - timeout_add(&fdc->fdctimeout_to, 4 * hz); + timeout_add_sec(&fdc->fdctimeout_to, 4); fd->sc_cylin = -1; fdc->sc_nstat = 0; fdc->sc_state = DSKCHGWAIT; @@ -1476,7 +1476,7 @@ loop: disk_busy(&fd->sc_dk); /* allow 3 seconds for operation */ - timeout_add(&fdc->fdctimeout_to, 3 * hz); + timeout_add_sec(&fdc->fdctimeout_to, 3); if (finfo != NULL) { /* formatting */ @@ -1661,7 +1661,7 @@ loop: fdc->sc_state = RECALWAIT; fdc->sc_itask = FDC_ITASK_SENSEI; fdc->sc_nstat = 0; - timeout_add(&fdc->fdctimeout_to, 5 * hz); + timeout_add_sec(&fdc->fdctimeout_to, 5); /* recalibrate function */ FDC_WRFIFO(fdc, NE7CMD_RECAL); FDC_WRFIFO(fdc, fd->sc_drive); diff --git a/sys/arch/sparc64/dev/z8530kbd.c b/sys/arch/sparc64/dev/z8530kbd.c index 3d4a5ddae06..5610131842a 100644 --- a/sys/arch/sparc64/dev/z8530kbd.c +++ b/sys/arch/sparc64/dev/z8530kbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: z8530kbd.c,v 1.19 2007/05/25 21:27:15 krw Exp $ */ +/* $OpenBSD: z8530kbd.c,v 1.20 2008/10/15 19:12:19 blambert Exp $ */ /* $NetBSD: z8530tty.c,v 1.77 2001/05/30 15:24:24 lukem Exp $ */ /*- @@ -932,7 +932,7 @@ zskbd_rxsoft(zst) if (cc == zskbd_rbuf_size) { zst->zst_floods++; if (zst->zst_errors++ == 0) - timeout_add(&zst->zst_diag_ch, 60 * hz); + timeout_add_sec(&zst->zst_diag_ch, 60); } while (cc) { @@ -942,7 +942,7 @@ zskbd_rxsoft(zst) if (ISSET(rr1, ZSRR1_DO)) { zst->zst_overflows++; if (zst->zst_errors++ == 0) - timeout_add(&zst->zst_diag_ch, 60 * hz); + timeout_add_sec(&zst->zst_diag_ch, 60); } if (ISSET(rr1, ZSRR1_FE)) SET(code, TTY_FE); diff --git a/sys/arch/sparc64/dev/z8530tty.c b/sys/arch/sparc64/dev/z8530tty.c index 79622eac199..80a14247bcc 100644 --- a/sys/arch/sparc64/dev/z8530tty.c +++ b/sys/arch/sparc64/dev/z8530tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: z8530tty.c,v 1.14 2008/01/18 21:35:54 kettenis Exp $ */ +/* $OpenBSD: z8530tty.c,v 1.15 2008/10/15 19:12:19 blambert Exp $ */ /* $NetBSD: z8530tty.c,v 1.77 2001/05/30 15:24:24 lukem Exp $ */ /*- @@ -1424,7 +1424,7 @@ zstty_rxsoft(zst, tp) if (cc == zstty_rbuf_size) { zst->zst_floods++; if (zst->zst_errors++ == 0) - timeout_add(&zst->zst_diag_ch, 60 * hz); + timeout_add_sec(&zst->zst_diag_ch, 60); } /* If not yet open, drop the entire buffer content here */ @@ -1441,7 +1441,7 @@ zstty_rxsoft(zst, tp) if (ISSET(rr1, ZSRR1_DO)) { zst->zst_overflows++; if (zst->zst_errors++ == 0) - timeout_add(&zst->zst_diag_ch, 60 * hz); + timeout_add_sec(&zst->zst_diag_ch, 60); } if (ISSET(rr1, ZSRR1_FE)) SET(code, TTY_FE); diff --git a/sys/arch/vax/qbus/dz.c b/sys/arch/vax/qbus/dz.c index 88f6848cd7e..3ce7edc9313 100644 --- a/sys/arch/vax/qbus/dz.c +++ b/sys/arch/vax/qbus/dz.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dz.c,v 1.16 2008/08/24 14:51:22 miod Exp $ */ +/* $OpenBSD: dz.c,v 1.17 2008/10/15 19:12:19 blambert Exp $ */ /* $NetBSD: dz.c,v 1.23 2000/06/04 02:14:12 matt Exp $ */ /* * Copyright (c) 1996 Ken C. Wellsch. All rights reserved. @@ -134,7 +134,7 @@ dzattach(struct dz_softc *sc) if (dz_timer == 0) { dz_timer = 1; timeout_set(&dz_timeout, dzscan, NULL); - timeout_add(&dz_timeout, hz); + timeout_add_sec(&dz_timeout, 1); } printf("\n"); } @@ -695,7 +695,7 @@ dzscan(void *arg) sc->sc_rxint = 0; } splx(s); - timeout_add(&dz_timeout, hz); + timeout_add_sec(&dz_timeout, 1); } /* diff --git a/sys/dev/bluetooth/bthidev.c b/sys/dev/bluetooth/bthidev.c index 2ac50931dd6..07dddfa314d 100644 --- a/sys/dev/bluetooth/bthidev.c +++ b/sys/dev/bluetooth/bthidev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bthidev.c,v 1.2 2008/02/24 21:46:19 uwe Exp $ */ +/* $OpenBSD: bthidev.c,v 1.3 2008/10/15 19:12:19 blambert Exp $ */ /* $NetBSD: bthidev.c,v 1.13 2007/11/12 19:19:32 plunky Exp $ */ /*- @@ -658,7 +658,7 @@ bthidev_ctl_disconnected(void *arg, int err) * Give them a second to do the right thing or let the * callout handle it. */ - timeout_add(&sc->sc_reconnect, hz); + timeout_add_sec(&sc->sc_reconnect, 1); } } @@ -688,7 +688,7 @@ bthidev_int_disconnected(void *arg, int err) * The control channel should be closing also, allow * them a chance to do that before we force it. */ - timeout_add(&sc->sc_reconnect, hz); + timeout_add_sec(&sc->sc_reconnect, 1); } } diff --git a/sys/dev/ic/ath.c b/sys/dev/ic/ath.c index 625b96225fd..25875cdc619 100644 --- a/sys/dev/ic/ath.c +++ b/sys/dev/ic/ath.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ath.c,v 1.78 2008/09/01 09:02:59 reyk Exp $ */ +/* $OpenBSD: ath.c,v 1.79 2008/10/15 19:12:19 blambert Exp $ */ /* $NetBSD: ath.c,v 1.37 2004/08/18 21:59:39 dyoung Exp $ */ /*- @@ -2894,7 +2894,7 @@ ath_calibrate(void *arg) __func__, c->ic_freq)); sc->sc_stats.ast_per_calfail++; } - timeout_add(&sc->sc_cal_to, hz * ath_calinterval); + timeout_add_sec(&sc->sc_cal_to, ath_calinterval); splx(s); } @@ -3024,7 +3024,7 @@ ath_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg) if (nstate == IEEE80211_S_RUN) { /* start periodic recalibration timer */ - timeout_add(&sc->sc_cal_to, hz * ath_calinterval); + timeout_add_sec(&sc->sc_cal_to, ath_calinterval); if (ic->ic_opmode != IEEE80211_M_MONITOR) timeout_add(&sc->sc_rssadapt_to, hz / 10); diff --git a/sys/dev/ic/bwi.c b/sys/dev/ic/bwi.c index 41271011809..a7f5d403b6f 100644 --- a/sys/dev/ic/bwi.c +++ b/sys/dev/ic/bwi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bwi.c,v 1.81 2008/08/27 10:03:47 damien Exp $ */ +/* $OpenBSD: bwi.c,v 1.82 2008/10/15 19:12:19 blambert Exp $ */ /* * Copyright (c) 2007 The DragonFly Project. All rights reserved. @@ -7453,7 +7453,7 @@ back: timeout_add(&sc->sc_scan_ch, (sc->sc_dwell_time * hz) / 1000); } else if (nstate == IEEE80211_S_RUN) { /* XXX 15 seconds */ - timeout_add(&sc->sc_calib_ch, hz); + timeout_add_sec(&sc->sc_calib_ch, 1); } return (error); @@ -9394,7 +9394,7 @@ bwi_calibrate(void *xsc) } /* XXX 15 seconds */ - timeout_add(&sc->sc_calib_ch, hz * 15); + timeout_add_sec(&sc->sc_calib_ch, 15); } splx(s); diff --git a/sys/dev/ic/com.c b/sys/dev/ic/com.c index 7e9ccbbdcce..0c5119f5edf 100644 --- a/sys/dev/ic/com.c +++ b/sys/dev/ic/com.c @@ -1,4 +1,4 @@ -/* $OpenBSD: com.c,v 1.128 2008/06/08 13:55:06 kettenis Exp $ */ +/* $OpenBSD: com.c,v 1.129 2008/10/15 19:12:19 blambert Exp $ */ /* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */ /* @@ -503,7 +503,7 @@ comclose(dev_t dev, int flag, int mode, struct proc *p) /* tty device is waiting for carrier; drop dtr then re-raise */ CLR(sc->sc_mcr, MCR_DTR | MCR_RTS); bus_space_write_1(iot, ioh, com_mcr, sc->sc_mcr); - timeout_add(&sc->sc_dtr_tmo, hz * 2); + timeout_add_sec(&sc->sc_dtr_tmo, 2); } else { /* no one else waiting; turn off the uart */ compwroff(sc); @@ -1161,7 +1161,7 @@ comintr(void *arg) if (p >= sc->sc_ibufend) { sc->sc_floods++; if (sc->sc_errors++ == 0) - timeout_add(&sc->sc_diag_tmo, 60 * hz); + timeout_add_sec(&sc->sc_diag_tmo, 60); } else { *p++ = data; *p++ = lsr; diff --git a/sys/dev/ic/dc.c b/sys/dev/ic/dc.c index 232494a990b..b78b6630110 100644 --- a/sys/dev/ic/dc.c +++ b/sys/dev/ic/dc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dc.c,v 1.105 2008/10/14 18:01:53 naddy Exp $ */ +/* $OpenBSD: dc.c,v 1.106 2008/10/15 19:12:19 blambert Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -2897,7 +2897,7 @@ dc_init(void *xsc) if (sc->dc_flags & DC_21143_NWAY) timeout_add(&sc->dc_tick_tmo, hz / 10); else - timeout_add(&sc->dc_tick_tmo, hz); + timeout_add_sec(&sc->dc_tick_tmo, 1); } #ifdef SRM_MEDIA diff --git a/sys/dev/ic/if_wi.c b/sys/dev/ic/if_wi.c index bc876e1966c..5712a0c9cc0 100644 --- a/sys/dev/ic/if_wi.c +++ b/sys/dev/ic/if_wi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wi.c,v 1.141 2008/10/02 20:21:13 brad Exp $ */ +/* $OpenBSD: if_wi.c,v 1.142 2008/10/15 19:12:19 blambert Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -126,7 +126,7 @@ u_int32_t widebug = WIDEBUG; #if !defined(lint) && !defined(__OpenBSD__) static const char rcsid[] = - "$OpenBSD: if_wi.c,v 1.141 2008/10/02 20:21:13 brad Exp $"; + "$OpenBSD: if_wi.c,v 1.142 2008/10/15 19:12:19 blambert Exp $"; #endif /* lint */ #ifdef foo @@ -873,7 +873,7 @@ wi_inquire(void *xsc) sc = xsc; ifp = &sc->sc_ic.ic_if; - timeout_add(&sc->sc_timo, hz * 60); + timeout_add_sec(&sc->sc_timo, 60); /* Don't do this while we're transmitting */ if (ifp->if_flags & IFF_OACTIVE) @@ -2248,7 +2248,7 @@ wi_init_io(struct wi_softc *sc) ifp->if_flags |= IFF_RUNNING; ifp->if_flags &= ~IFF_OACTIVE; - timeout_add(&sc->sc_timo, hz * 60); + timeout_add_sec(&sc->sc_timo, 60); return; } diff --git a/sys/dev/ic/if_wi_hostap.c b/sys/dev/ic/if_wi_hostap.c index 6a54188a3b6..f944f1ad0c4 100644 --- a/sys/dev/ic/if_wi_hostap.c +++ b/sys/dev/ic/if_wi_hostap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wi_hostap.c,v 1.40 2007/10/09 17:06:18 gilles Exp $ */ +/* $OpenBSD: if_wi_hostap.c,v 1.41 2008/10/15 19:12:19 blambert Exp $ */ /* * Copyright (c) 2002 @@ -376,7 +376,7 @@ wihap_timeout(void *v) * until inactivity_time seconds have passed. */ wihap_sta_movetail(whi, sta); - timeout_add(&sta->tmo, hz * whi->inactivity_time); + timeout_add_sec(&sta->tmo, whi->inactivity_time); } else if (sta->flags & WI_SIFLAGS_AUTHEN) { if (sc->sc_ic.ic_if.if_flags & IFF_DEBUG) printf("wihap_timeout: deauth due to inactivity: %s\n", @@ -480,7 +480,7 @@ wihap_sta_alloc(struct wi_softc *sc, u_int8_t *addr) whi->n_stations++; bcopy(addr, &sta->addr, ETHER_ADDR_LEN); timeout_set(&sta->tmo, wihap_sta_timeout, sta); - timeout_add(&sta->tmo, hz * whi->inactivity_time); + timeout_add_sec(&sta->tmo, whi->inactivity_time); return (sta); } @@ -616,7 +616,7 @@ wihap_auth_req(struct wi_softc *sc, struct wi_frame *rxfrm, goto fail; } } - timeout_add(&sta->tmo, hz * whi->inactivity_time); + timeout_add_sec(&sta->tmo, whi->inactivity_time); /* Note: it's okay to leave the station info structure around * if the authen fails. It'll be timed out eventually. @@ -829,7 +829,7 @@ wihap_assoc_req(struct wi_softc *sc, struct wi_frame *rxfrm, } sta->flags |= WI_SIFLAGS_ASSOC; - timeout_add(&sta->tmo, hz * whi->inactivity_time); + timeout_add_sec(&sta->tmo, whi->inactivity_time); status = IEEE80211_STATUS_SUCCESS; fail: @@ -1052,7 +1052,7 @@ wihap_sta_is_assoc(struct wihap_info *whi, u_int8_t addr[]) sta = wihap_sta_find(whi, addr); if (sta != NULL && (sta->flags & WI_SIFLAGS_ASSOC)) { /* Keep it active. */ - timeout_add(&sta->tmo, hz * whi->inactivity_time); + timeout_add_sec(&sta->tmo, whi->inactivity_time); return (1); } @@ -1080,7 +1080,7 @@ wihap_check_tx(struct wihap_info *whi, u_int8_t addr[], u_int8_t *txrate) sta = wihap_sta_find(whi, addr); if (sta != NULL && (sta->flags & WI_SIFLAGS_ASSOC)) { /* Keep it active. */ - timeout_add(&sta->tmo, hz * whi->inactivity_time); + timeout_add_sec(&sta->tmo, whi->inactivity_time); *txrate = txratetable[sta->tx_curr_rate]; splx(s); return (1); @@ -1150,7 +1150,7 @@ wihap_data_input(struct wi_softc *sc, struct wi_frame *rxfrm, struct mbuf *m) return (1); } - timeout_add(&sta->tmo, hz * whi->inactivity_time); + timeout_add_sec(&sta->tmo, whi->inactivity_time); sta->sig_info = letoh16(rxfrm->wi_q_info); splx(s); @@ -1274,7 +1274,7 @@ wihap_ioctl(struct wi_softc *sc, u_long command, caddr_t data) } sta = wihap_sta_alloc(sc, reqsta.addr); sta->flags = reqsta.flags; - timeout_add(&sta->tmo, hz * whi->inactivity_time); + timeout_add_sec(&sta->tmo, whi->inactivity_time); splx(s); break; diff --git a/sys/dev/ic/isp_openbsd.c b/sys/dev/ic/isp_openbsd.c index b732a6aeb8d..8864a834ade 100644 --- a/sys/dev/ic/isp_openbsd.c +++ b/sys/dev/ic/isp_openbsd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: isp_openbsd.c,v 1.32 2008/03/19 18:37:20 kettenis Exp $ */ +/* $OpenBSD: isp_openbsd.c,v 1.33 2008/10/15 19:12:18 blambert Exp $ */ /* * Platform (OpenBSD) dependent common attachment code for QLogic adapters. * @@ -612,7 +612,7 @@ isp_requeue(void *arg) (r == CMD_EAGAIN)? "CMD_EAGAIN" : "CMD_RQLATER", XS_TGT(xs), XS_LUN(xs)); timeout_set(&xs->stimeout, isp_requeue, xs); - timeout_add(&xs->stimeout, hz); + timeout_add_sec(&xs->stimeout, 1); XS_CMD_S_TIMER(xs); break; case CMD_COMPLETE: diff --git a/sys/dev/isa/fd.c b/sys/dev/isa/fd.c index 528a0daf223..b5cde05df53 100644 --- a/sys/dev/isa/fd.c +++ b/sys/dev/isa/fd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fd.c,v 1.74 2008/06/12 06:58:39 deraadt Exp $ */ +/* $OpenBSD: fd.c,v 1.75 2008/10/15 19:12:18 blambert Exp $ */ /* $NetBSD: fd.c,v 1.90 1996/05/12 23:12:03 mycroft Exp $ */ /*- @@ -496,7 +496,7 @@ fdfinish(fd, bp) biodone(bp); /* turn off motor 5s from now */ - timeout_add(&fd->fd_motor_off_to, 5 * hz); + timeout_add_sec(&fd->fd_motor_off_to, 5); fdc->sc_state = DEVIDLE; } @@ -760,7 +760,7 @@ loop: fd->sc_dk.dk_seek++; disk_busy(&fd->sc_dk); - timeout_add(&fd->fdtimeout_to, 4 * hz); + timeout_add_sec(&fd->fdtimeout_to, 4); return 1; case DOIO: @@ -827,7 +827,7 @@ loop: disk_busy(&fd->sc_dk); /* allow 2 seconds for operation */ - timeout_add(&fd->fdtimeout_to, 2 * hz); + timeout_add_sec(&fd->fdtimeout_to, 2); return 1; /* will return later */ case SEEKWAIT: @@ -918,7 +918,7 @@ loop: out_fdc(iot, ioh, NE7CMD_RECAL); /* recal function */ out_fdc(iot, ioh, fd->sc_drive); fdc->sc_state = RECALWAIT; - timeout_add(&fd->fdtimeout_to, 5 * hz); + timeout_add_sec(&fd->fdtimeout_to, 5); return 1; /* will return later */ case RECALWAIT: diff --git a/sys/dev/isa/gus.c b/sys/dev/isa/gus.c index 910e108cd96..4fb4f1d61f3 100644 --- a/sys/dev/isa/gus.c +++ b/sys/dev/isa/gus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gus.c,v 1.31 2008/06/26 05:42:16 ray Exp $ */ +/* $OpenBSD: gus.c,v 1.32 2008/10/15 19:12:18 blambert Exp $ */ /* $NetBSD: gus.c,v 1.51 1998/01/25 23:48:06 mycroft Exp $ */ /*- @@ -1324,7 +1324,7 @@ gusdmaout(sc, flags, gusaddr, buffaddr, length) /* * XXX If we don't finish in one second, give up... */ - timeout_add(&sc->sc_dma_tmo, hz); + timeout_add_sec(&sc->sc_dma_tmo, 1); } /* diff --git a/sys/dev/isa/nsclpcsio_isa.c b/sys/dev/isa/nsclpcsio_isa.c index 10772768660..34b5090a247 100644 --- a/sys/dev/isa/nsclpcsio_isa.c +++ b/sys/dev/isa/nsclpcsio_isa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nsclpcsio_isa.c,v 1.12 2007/06/01 21:30:31 cnst Exp $ */ +/* $OpenBSD: nsclpcsio_isa.c,v 1.13 2008/10/15 19:12:18 blambert Exp $ */ /* $NetBSD: nsclpcsio_isa.c,v 1.5 2002/10/22 16:18:26 drochner Exp $ */ /* @@ -337,7 +337,7 @@ nsclpcsio_isa_attach(struct device *parent, struct device *self, void *aux) sensordev_install(&sc->sensordev); if (sc->sc_ld_en[SIO_LDN_TMS] || sc->sc_ld_en[SIO_LDN_VLM]) { timeout_set(&nsclpcsio_timeout, nsclpcsio_refresh, sc); - timeout_add(&nsclpcsio_timeout, (20 * hz) / 10); + timeout_add_sec(&nsclpcsio_timeout, 2); } /* Attach GPIO framework */ @@ -359,7 +359,7 @@ nsclpcsio_refresh(void *arg) nsclpcsio_tms_update(sc); if (sc->sc_ld_en[SIO_LDN_VLM]) nsclpcsio_vlm_update(sc); - timeout_add(&nsclpcsio_timeout, (20 * hz) / 10); + timeout_add_sec(&nsclpcsio_timeout, 2); } void diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c index 0012e3bdb13..541f87f46f2 100644 --- a/sys/dev/pci/if_em.c +++ b/sys/dev/pci/if_em.c @@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE. ***************************************************************************/ -/* $OpenBSD: if_em.c,v 1.191 2008/10/05 11:57:48 kettenis Exp $ */ +/* $OpenBSD: if_em.c,v 1.192 2008/10/15 19:12:18 blambert Exp $ */ /* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */ #include <dev/pci/if_em.h> @@ -768,7 +768,7 @@ em_init(void *arg) ifp->if_flags |= IFF_RUNNING; ifp->if_flags &= ~IFF_OACTIVE; - timeout_add(&sc->timer_handle, hz); + timeout_add_sec(&sc->timer_handle, 1); em_clear_hw_cntrs(&sc->hw); em_enable_intr(sc); @@ -813,7 +813,7 @@ em_intr(void *arg) sc->hw.get_link_status = 1; em_check_for_link(&sc->hw); em_update_link_status(sc); - timeout_add(&sc->timer_handle, hz); + timeout_add_sec(&sc->timer_handle, 1); } if (reg_icr & E1000_ICR_RXO) @@ -1379,7 +1379,7 @@ em_local_timer(void *arg) #endif em_smartspeed(sc); - timeout_add(&sc->timer_handle, hz); + timeout_add_sec(&sc->timer_handle, 1); splx(s); } diff --git a/sys/dev/pci/if_nge.c b/sys/dev/pci/if_nge.c index ef1703a53a9..3ee2a043e6a 100644 --- a/sys/dev/pci/if_nge.c +++ b/sys/dev/pci/if_nge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_nge.c,v 1.59 2008/10/02 20:21:14 brad Exp $ */ +/* $OpenBSD: if_nge.c,v 1.60 2008/10/15 19:12:18 blambert Exp $ */ /* * Copyright (c) 2001 Wind River Systems * Copyright (c) 1997, 1998, 1999, 2000, 2001 @@ -950,7 +950,7 @@ nge_attach(parent, self, aux) ether_ifattach(ifp); DPRINTFN(5, ("%s: timeout_set\n", sc->sc_dv.dv_xname)); timeout_set(&sc->nge_timeout, nge_tick, sc); - timeout_add(&sc->nge_timeout, hz); + timeout_add_sec(&sc->nge_timeout, 1); return; fail_5: @@ -1430,7 +1430,7 @@ nge_tick(xsc) DPRINTFN(10, ("%s: nge_tick: link=%d\n", sc->sc_dv.dv_xname, sc->nge_link)); - timeout_add(&sc->nge_timeout, hz); + timeout_add_sec(&sc->nge_timeout, 1); if (sc->nge_link) { splx(s); return; diff --git a/sys/dev/pci/pccbb.c b/sys/dev/pci/pccbb.c index c1aad74d16d..267fb19ac28 100644 --- a/sys/dev/pci/pccbb.c +++ b/sys/dev/pci/pccbb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pccbb.c,v 1.62 2008/09/25 17:54:01 chl Exp $ */ +/* $OpenBSD: pccbb.c,v 1.63 2008/10/15 19:12:18 blambert Exp $ */ /* $NetBSD: pccbb.c,v 1.96 2004/03/28 09:49:31 nakayama Exp $ */ /* @@ -2626,7 +2626,7 @@ pccbb_pcmcia_poll(arg) u_int32_t spsr; /* socket present-state reg */ timeout_set(&pccbb_poll_timeout, pccbb_pcmcia_poll, arg); - timeout_add(&pccbb_poll_timeout, hz * 2); + timeout_add_sec(&pccbb_poll_timeout, 2); switch (poll->level) { case IPL_NET: s = splnet(); diff --git a/sys/dev/pci/safe.c b/sys/dev/pci/safe.c index 3795b067655..3a5bfd46ac1 100644 --- a/sys/dev/pci/safe.c +++ b/sys/dev/pci/safe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: safe.c,v 1.23 2008/06/09 07:07:16 djm Exp $ */ +/* $OpenBSD: safe.c,v 1.24 2008/10/15 19:12:18 blambert Exp $ */ /*- * Copyright (c) 2003 Sam Leffler, Errno Consulting @@ -302,7 +302,7 @@ safe_attach(struct device *parent, struct device *self, void *aux) safe_rng_init(sc); timeout_set(&sc->sc_rngto, safe_rng, sc); - timeout_add(&sc->sc_rngto, hz * safe_rnginterval); + timeout_add_sec(&sc->sc_rngto, safe_rnginterval); } return; @@ -1257,7 +1257,7 @@ retry: for (i = 0; i < maxwords; i++) add_true_randomness(buf[i]); - timeout_add(&sc->sc_rngto, hz * safe_rnginterval); + timeout_add_sec(&sc->sc_rngto, safe_rnginterval); } /* diff --git a/sys/dev/usb/if_ral.c b/sys/dev/usb/if_ral.c index f84f4ddbbba..fd49d0f6e0b 100644 --- a/sys/dev/usb/if_ral.c +++ b/sys/dev/usb/if_ral.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ral.c,v 1.108 2008/08/27 10:34:24 damien Exp $ */ +/* $OpenBSD: if_ral.c,v 1.109 2008/10/15 19:12:18 blambert Exp $ */ /*- * Copyright (c) 2005, 2006 @@ -2145,7 +2145,7 @@ ural_amrr_start(struct ural_softc *sc, struct ieee80211_node *ni) i--); ni->ni_txrate = i; - timeout_add(&sc->amrr_to, hz); + timeout_add_sec(&sc->amrr_to, 1); } void @@ -2201,7 +2201,7 @@ ural_amrr_update(usbd_xfer_handle xfer, usbd_private_handle priv, ieee80211_amrr_choose(&sc->amrr, sc->sc_ic.ic_bss, &sc->amn); - timeout_add(&sc->amrr_to, hz); + timeout_add_sec(&sc->amrr_to, 1); } int diff --git a/sys/dev/usb/if_rum.c b/sys/dev/usb/if_rum.c index df53a86dad1..3f491a43df2 100644 --- a/sys/dev/usb/if_rum.c +++ b/sys/dev/usb/if_rum.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_rum.c,v 1.78 2008/08/27 09:05:03 damien Exp $ */ +/* $OpenBSD: if_rum.c,v 1.79 2008/10/15 19:12:18 blambert Exp $ */ /*- * Copyright (c) 2005-2007 Damien Bergamini <damien.bergamini@free.fr> @@ -2218,7 +2218,7 @@ rum_amrr_start(struct rum_softc *sc, struct ieee80211_node *ni) i--); ni->ni_txrate = i; - timeout_add(&sc->amrr_to, hz); + timeout_add_sec(&sc->amrr_to, 1); } void @@ -2269,7 +2269,7 @@ rum_amrr_update(usbd_xfer_handle xfer, usbd_private_handle priv, ieee80211_amrr_choose(&sc->amrr, sc->sc_ic.ic_bss, &sc->amn); - timeout_add(&sc->amrr_to, hz); + timeout_add_sec(&sc->amrr_to, 1); } int diff --git a/sys/dev/usb/if_uath.c b/sys/dev/usb/if_uath.c index 5b43dcdce37..6955a630625 100644 --- a/sys/dev/usb/if_uath.c +++ b/sys/dev/usb/if_uath.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_uath.c,v 1.36 2008/09/23 10:47:14 canacar Exp $ */ +/* $OpenBSD: if_uath.c,v 1.37 2008/10/15 19:12:18 blambert Exp $ */ /*- * Copyright (c) 2006 @@ -911,7 +911,7 @@ uath_task(void *arg) 0); /* start statistics timer */ - timeout_add(&sc->stat_to, hz); + timeout_add_sec(&sc->stat_to, 1); break; } } @@ -1163,7 +1163,7 @@ uath_cmd_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, case UATH_NOTIF_STATS: DPRINTFN(2, ("received device statistics\n")); - timeout_add(&sc->stat_to, hz); + timeout_add_sec(&sc->stat_to, 1); break; } diff --git a/sys/dev/usb/if_zyd.c b/sys/dev/usb/if_zyd.c index cc1a3c30a1c..65a823cd054 100644 --- a/sys/dev/usb/if_zyd.c +++ b/sys/dev/usb/if_zyd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_zyd.c,v 1.71 2008/08/27 09:49:32 damien Exp $ */ +/* $OpenBSD: if_zyd.c,v 1.72 2008/10/15 19:12:18 blambert Exp $ */ /*- * Copyright (c) 2006 by Damien Bergamini <damien.bergamini@free.fr> @@ -731,7 +731,7 @@ zyd_task(void *arg) /* start automatic rate control timer */ if (ic->ic_fixed_rate == -1) - timeout_add(&sc->amrr_to, hz); + timeout_add_sec(&sc->amrr_to, 1); break; } @@ -2587,7 +2587,7 @@ zyd_amrr_timeout(void *arg) ieee80211_iterate_nodes(ic, zyd_iter_func, sc); splx(s); - timeout_add(&sc->amrr_to, hz); + timeout_add_sec(&sc->amrr_to, 1); } void diff --git a/sys/net/trunklacp.c b/sys/net/trunklacp.c index 03ef3339ce2..53bc15d83ff 100644 --- a/sys/net/trunklacp.c +++ b/sys/net/trunklacp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trunklacp.c,v 1.5 2008/10/12 19:03:12 mpf Exp $ */ +/* $OpenBSD: trunklacp.c,v 1.6 2008/10/15 19:12:18 blambert Exp $ */ /* $NetBSD: ieee8023ad_lacp.c,v 1.3 2005/12/11 12:24:54 christos Exp $ */ /* $FreeBSD:ieee8023ad_lacp.c,v 1.15 2008/03/16 19:25:30 thompsa Exp $ */ @@ -500,7 +500,7 @@ lacp_tick(void *arg) lacp_sm_tx(lp); lacp_sm_ptx_tx_schedule(lp); } - timeout_add(&lsc->lsc_callout, hz); + timeout_add_sec(&lsc->lsc_callout, 1); } int @@ -762,7 +762,7 @@ lacp_init(struct trunk_softc *sc) { struct lacp_softc *lsc = LACP_SOFTC(sc); - timeout_add(&lsc->lsc_callout, hz); + timeout_add_sec(&lsc->lsc_callout, 1); } void diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index 35c674701aa..50116a14b75 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_node.c,v 1.46 2008/09/27 15:16:09 damien Exp $ */ +/* $OpenBSD: ieee80211_node.c,v 1.47 2008/10/15 19:12:18 blambert Exp $ */ /* $NetBSD: ieee80211_node.c,v 1.14 2004/05/09 09:18:47 dyoung Exp $ */ /*- @@ -367,7 +367,7 @@ ieee80211_create_ibss(struct ieee80211com* ic, struct ieee80211_channel *chan) ni->ni_flags |= IEEE80211_NODE_TXPROT; /* schedule a GTK/IGTK rekeying after 3600s */ - timeout_add(&ic->ic_rsn_timeout, 3600 * hz); + timeout_add_sec(&ic->ic_rsn_timeout, 3600); } ieee80211_new_state(ic, IEEE80211_S_RUN, -1); } diff --git a/sys/net80211/ieee80211_proto.c b/sys/net80211/ieee80211_proto.c index 30107f4dad4..c79455e450c 100644 --- a/sys/net80211/ieee80211_proto.c +++ b/sys/net80211/ieee80211_proto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_proto.c,v 1.36 2008/09/27 15:16:09 damien Exp $ */ +/* $OpenBSD: ieee80211_proto.c,v 1.37 2008/10/15 19:12:18 blambert Exp $ */ /* $NetBSD: ieee80211_proto.c,v 1.8 2004/04/30 23:58:20 dyoung Exp $ */ /*- @@ -509,7 +509,7 @@ ieee80211_gtk_rekey_timeout(void *arg) splx(s); /* re-schedule a GTK rekeying after 3600s */ - timeout_add(&ic->ic_rsn_timeout, 3600 * hz); + timeout_add_sec(&ic->ic_rsn_timeout, 3600); } #endif /* IEEE80211_STA_ONLY */ diff --git a/sys/netatalk/aarp.c b/sys/netatalk/aarp.c index f33046f29f9..d59b9c272f0 100644 --- a/sys/netatalk/aarp.c +++ b/sys/netatalk/aarp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aarp.c,v 1.7 2006/04/25 05:52:43 tedu Exp $ */ +/* $OpenBSD: aarp.c,v 1.8 2008/10/15 19:12:18 blambert Exp $ */ /* * Copyright (c) 1990,1991 Regents of The University of Michigan. @@ -144,7 +144,7 @@ aarptimer(v) struct aarptab *aat; int i, s; - timeout_add(&aarptimer_timeout, AARPT_AGE * hz); + timeout_add_sec(&aarptimer_timeout, AARPT_AGE); aat = aarptab; for ( i = 0; i < AARPTAB_SIZE; i++, aat++ ) { if ( aat->aat_flags == 0 || ( aat->aat_flags & ATF_PERM )) @@ -575,7 +575,7 @@ aarptnew( addr ) if ( first ) { first = 0; timeout_set(&aarptimer_timeout, aarptimer, NULL); - timeout_add(&aarptimer_timeout, hz); + timeout_add_sec(&aarptimer_timeout, 1); } aat = &aarptab[ AARPTAB_HASH( *addr ) * AARPTAB_BSIZ ]; for ( n = 0; n < AARPTAB_BSIZ; n++, aat++ ) { diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c index dc9f5dbd335..41e2e68edac 100644 --- a/sys/netinet6/ip6_input.c +++ b/sys/netinet6/ip6_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_input.c,v 1.87 2008/09/17 05:43:14 chl Exp $ */ +/* $OpenBSD: ip6_input.c,v 1.88 2008/10/15 19:12:18 blambert Exp $ */ /* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */ /* @@ -173,7 +173,7 @@ ip6_init2(void *dummy) /* nd6_timer_init */ bzero(&nd6_timer_ch, sizeof(nd6_timer_ch)); timeout_set(&nd6_timer_ch, nd6_timer, NULL); - timeout_add(&nd6_timer_ch, hz); + timeout_add_sec(&nd6_timer_ch, 1); } /* diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index 8239046ce21..9c62a91ea1d 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nd6.c,v 1.80 2008/09/17 05:43:14 chl Exp $ */ +/* $OpenBSD: nd6.c,v 1.81 2008/10/15 19:12:18 blambert Exp $ */ /* $KAME: nd6.c,v 1.280 2002/06/08 19:52:07 itojun Exp $ */ /* @@ -142,7 +142,7 @@ nd6_init() /* start timer */ timeout_set(&nd6_slowtimo_ch, nd6_slowtimo, NULL); - timeout_add(&nd6_slowtimo_ch, ND6_SLOWTIMER_INTERVAL * hz); + timeout_add_sec(&nd6_slowtimo_ch, ND6_SLOWTIMER_INTERVAL); } struct nd_ifinfo * @@ -513,7 +513,7 @@ nd6_timer(void *ignored_arg) s = splsoftnet(); timeout_set(&nd6_timer_ch, nd6_timer, NULL); - timeout_add(&nd6_timer_ch, nd6_prune * hz); + timeout_add_sec(&nd6_timer_ch, nd6_prune); /* expire default router list */ dr = TAILQ_FIRST(&nd_defrouter); @@ -1716,7 +1716,7 @@ nd6_slowtimo(void *ignored_arg) struct ifnet *ifp; timeout_set(&nd6_slowtimo_ch, nd6_slowtimo, NULL); - timeout_add(&nd6_slowtimo_ch, ND6_SLOWTIMER_INTERVAL * hz); + timeout_add_sec(&nd6_slowtimo_ch, ND6_SLOWTIMER_INTERVAL); for (ifp = TAILQ_FIRST(&ifnet); ifp; ifp = TAILQ_NEXT(ifp, if_list)) { nd6if = ND_IFINFO(ifp); |