diff options
Diffstat (limited to 'sys/dev/usb')
-rw-r--r-- | sys/dev/usb/ehci.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/if_aue.c | 6 | ||||
-rw-r--r-- | sys/dev/usb/if_axe.c | 6 | ||||
-rw-r--r-- | sys/dev/usb/if_cue.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/if_udav.c | 6 | ||||
-rw-r--r-- | sys/dev/usb/if_url.c | 6 | ||||
-rw-r--r-- | sys/dev/usb/ohci.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/umbg.c | 17 |
8 files changed, 24 insertions, 29 deletions
diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c index 283a6eb33ef..3f39cf1b7c2 100644 --- a/sys/dev/usb/ehci.c +++ b/sys/dev/usb/ehci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ehci.c,v 1.89 2008/09/08 07:08:27 brad Exp $ */ +/* $OpenBSD: ehci.c,v 1.90 2008/09/10 14:01:23 blambert Exp $ */ /* $NetBSD: ehci.c,v 1.66 2004/06/30 03:11:56 mycroft Exp $ */ /* @@ -671,7 +671,7 @@ ehci_softintr(void *v) /* Schedule a callout to catch any dropped transactions. */ if ((sc->sc_flags & EHCIF_DROPPED_INTR_WORKAROUND) && !LIST_EMPTY(&sc->sc_intrhead)) { - timeout_add(&sc->sc_tmo_intrlist, hz); + timeout_add_sec(&sc->sc_tmo_intrlist, 1); } #ifdef __HAVE_GENERIC_SOFT_INTERRUPTS diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c index 309c2d64e98..802cf569540 100644 --- a/sys/dev/usb/if_aue.c +++ b/sys/dev/usb/if_aue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_aue.c,v 1.71 2008/03/18 12:24:19 jsg Exp $ */ +/* $OpenBSD: if_aue.c,v 1.72 2008/09/10 14:01:23 blambert Exp $ */ /* $NetBSD: if_aue.c,v 1.82 2003/03/05 17:37:36 shiba Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -1245,7 +1245,7 @@ aue_tick_task(void *xsc) aue_start(ifp); } - timeout_add(&sc->aue_stat_ch, hz); + timeout_add_sec(&sc->aue_stat_ch, 1); splx(s); } @@ -1415,7 +1415,7 @@ aue_init(void *xsc) splx(s); - timeout_add(&sc->aue_stat_ch, hz); + timeout_add_sec(&sc->aue_stat_ch, 1); } int diff --git a/sys/dev/usb/if_axe.c b/sys/dev/usb/if_axe.c index 49960fba976..3a0dd25ab34 100644 --- a/sys/dev/usb/if_axe.c +++ b/sys/dev/usb/if_axe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_axe.c,v 1.85 2008/05/14 01:41:10 brad Exp $ */ +/* $OpenBSD: if_axe.c,v 1.86 2008/09/10 14:01:23 blambert Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Jonathan Gray <jsg@openbsd.org> @@ -1126,7 +1126,7 @@ axe_tick_task(void *xsc) axe_start(ifp); } - timeout_add(&sc->axe_stat_ch, hz); + timeout_add_sec(&sc->axe_stat_ch, 1); splx(s); } @@ -1325,7 +1325,7 @@ axe_init(void *xsc) splx(s); - timeout_add(&sc->axe_stat_ch, hz); + timeout_add_sec(&sc->axe_stat_ch, 1); return; } diff --git a/sys/dev/usb/if_cue.c b/sys/dev/usb/if_cue.c index b84ecbd528e..8b6df602f65 100644 --- a/sys/dev/usb/if_cue.c +++ b/sys/dev/usb/if_cue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cue.c,v 1.48 2007/11/23 15:43:02 mbalmer Exp $ */ +/* $OpenBSD: if_cue.c,v 1.49 2008/09/10 14:01:23 blambert Exp $ */ /* $NetBSD: if_cue.c,v 1.40 2002/07/11 21:14:26 augustss Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -1056,7 +1056,7 @@ cue_init(void *xsc) splx(s); - timeout_add(&sc->cue_stat_ch, hz); + timeout_add_sec(&sc->cue_stat_ch, 1); } int diff --git a/sys/dev/usb/if_udav.c b/sys/dev/usb/if_udav.c index 028ddc22dde..8b6628e3d2e 100644 --- a/sys/dev/usb/if_udav.c +++ b/sys/dev/usb/if_udav.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_udav.c,v 1.40 2007/11/23 15:43:02 mbalmer Exp $ */ +/* $OpenBSD: if_udav.c,v 1.41 2008/09/10 14:01:23 blambert Exp $ */ /* $NetBSD: if_udav.c,v 1.3 2004/04/23 17:25:25 itojun Exp $ */ /* $nabe: if_udav.c,v 1.3 2003/08/21 16:57:19 nabe Exp $ */ /* @@ -683,7 +683,7 @@ udav_init(struct ifnet *ifp) splx(s); - timeout_add(&sc->sc_stat_ch, hz); + timeout_add_sec(&sc->sc_stat_ch, 1); return (0); } @@ -1497,7 +1497,7 @@ udav_tick_task(void *xsc) udav_start(ifp); } - timeout_add(&sc->sc_stat_ch, hz); + timeout_add_sec(&sc->sc_stat_ch, 1); splx(s); } diff --git a/sys/dev/usb/if_url.c b/sys/dev/usb/if_url.c index dff0568c6c4..2d9b1e87e39 100644 --- a/sys/dev/usb/if_url.c +++ b/sys/dev/usb/if_url.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_url.c,v 1.50 2007/11/23 15:43:02 mbalmer Exp $ */ +/* $OpenBSD: if_url.c,v 1.51 2008/09/10 14:01:23 blambert Exp $ */ /* $NetBSD: if_url.c,v 1.6 2002/09/29 10:19:21 martin Exp $ */ /* * Copyright (c) 2001, 2002 @@ -574,7 +574,7 @@ url_init(struct ifnet *ifp) splx(s); - timeout_add(&sc->sc_stat_ch, hz); + timeout_add_sec(&sc->sc_stat_ch, 1); return (0); } @@ -1381,7 +1381,7 @@ url_tick_task(void *xsc) url_start(ifp); } - timeout_add(&sc->sc_stat_ch, hz); + timeout_add_sec(&sc->sc_stat_ch, 1); splx(s); } diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c index 6f99c172624..6a984bd2c6b 100644 --- a/sys/dev/usb/ohci.c +++ b/sys/dev/usb/ohci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ohci.c,v 1.87 2008/06/29 10:04:15 yuo Exp $ */ +/* $OpenBSD: ohci.c,v 1.88 2008/09/10 14:01:23 blambert Exp $ */ /* $NetBSD: ohci.c,v 1.139 2003/02/22 05:24:16 tsutsui Exp $ */ /* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */ @@ -1181,7 +1181,7 @@ ohci_intr1(ohci_softc_t *sc) sc->sc_bus.bdev.dv_xname)); /* Do not allow RHSC interrupts > 1 per second */ - timeout_add(&sc->sc_tmo_rhsc, hz); + timeout_add_sec(&sc->sc_tmo_rhsc, 1); eintrs &= ~OHCI_RHSC; } diff --git a/sys/dev/usb/umbg.c b/sys/dev/usb/umbg.c index 3f11ca01da5..ae714b9565a 100644 --- a/sys/dev/usb/umbg.c +++ b/sys/dev/usb/umbg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: umbg.c,v 1.6 2007/11/23 16:34:47 mbalmer Exp $ */ +/* $OpenBSD: umbg.c,v 1.7 2008/09/10 14:01:23 blambert Exp $ */ /* * Copyright (c) 2007 Marc Balmer <mbalmer@openbsd.org> @@ -177,7 +177,6 @@ umbg_attach(struct device *parent, struct device *self, void *aux) struct usb_attach_arg *uaa = aux; usbd_device_handle dev = uaa->device; usbd_interface_handle iface = uaa->iface; - struct timeval t; struct mbg_time tframe; usb_endpoint_descriptor_t *ed; usbd_status err; @@ -284,13 +283,9 @@ umbg_attach(struct device *parent, struct device *self, void *aux) usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev, &sc->sc_dev); - /* convert timevals to hz */ - t.tv_sec = 5L; - t.tv_usec = 0L; - t_wait = tvtohz(&t); + t_wait = 5; - t.tv_sec = TRUSTTIME; - t_trust = tvtohz(&t); + t_trust = TRUSTTIME; usb_add_task(sc->sc_udev, &sc->sc_task); return; @@ -380,7 +375,7 @@ umbg_task(void *arg) if (sc->sc_timedelta.status == SENSOR_S_UNKNOWN || !(letoh16(tframe.status) & MBG_FREERUN)) { sc->sc_timedelta.status = SENSOR_S_OK; - timeout_add(&sc->sc_it_to, t_trust); + timeout_add_sec(&sc->sc_it_to, t_trust); } sc->sc_timedelta.tv.tv_sec = tstamp.tv_sec; @@ -399,7 +394,7 @@ umbg_task(void *arg) sc->sc_signal.tv.tv_usec = sc->sc_timedelta.tv.tv_usec; bail_out: - timeout_add(&sc->sc_to, t_wait); + timeout_add_sec(&sc->sc_to, t_wait); } @@ -456,7 +451,7 @@ umbg_it_intr(void *xsc) * further degrade in TRUSTTIME seconds if the clocks remains * free running. */ - timeout_add(&sc->sc_it_to, t_trust); + timeout_add_sec(&sc->sc_it_to, t_trust); } else sc->sc_timedelta.status = SENSOR_S_CRIT; } |