diff options
author | Christopher Pascoe <pascoe@cvs.openbsd.org> | 2005-03-06 05:12:01 +0000 |
---|---|---|
committer | Christopher Pascoe <pascoe@cvs.openbsd.org> | 2005-03-06 05:12:01 +0000 |
commit | 04f2e148f9f06a8ea3bd2c0b954595742017e3cf (patch) | |
tree | f4ee5a9c8f1df75680477b2833bd34320f562ffa /sys/dev/usb | |
parent | 1cef10f687b0da1a6546c67b3f2c17e48b5d7ecf (diff) |
In [eo]hci_waitintr, xfer->timeout is in ms, not hz.
ok dlg@
Diffstat (limited to 'sys/dev/usb')
-rw-r--r-- | sys/dev/usb/ehci.c | 7 | ||||
-rw-r--r-- | sys/dev/usb/ohci.c | 7 |
2 files changed, 6 insertions, 8 deletions
diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c index 63c6c0bd17c..e678661acd4 100644 --- a/sys/dev/usb/ehci.c +++ b/sys/dev/usb/ehci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ehci.c,v 1.35 2005/02/28 12:35:44 pascoe Exp $ */ +/* $OpenBSD: ehci.c,v 1.36 2005/03/06 05:12:00 pascoe Exp $ */ /* $NetBSD: ehci.c,v 1.66 2004/06/30 03:11:56 mycroft Exp $ */ /* @@ -868,12 +868,11 @@ ehci_idone(struct ehci_xfer *ex) void ehci_waitintr(ehci_softc_t *sc, usbd_xfer_handle xfer) { - int timo = xfer->timeout; - int usecs; + int timo; u_int32_t intrs; xfer->status = USBD_IN_PROGRESS; - for (usecs = timo * 1000000 / hz; usecs > 0; usecs -= 1000) { + for (timo = xfer->timeout; timo >= 0; timo--) { usb_delay_ms(&sc->sc_bus, 1); if (sc->sc_dying) break; diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c index cf851294651..720696b92b0 100644 --- a/sys/dev/usb/ohci.c +++ b/sys/dev/usb/ohci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ohci.c,v 1.52 2004/12/26 22:41:40 miod Exp $ */ +/* $OpenBSD: ohci.c,v 1.53 2005/03/06 05:12:00 pascoe 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 $ */ @@ -1592,12 +1592,11 @@ ohci_root_ctrl_done(usbd_xfer_handle xfer) void ohci_waitintr(ohci_softc_t *sc, usbd_xfer_handle xfer) { - int timo = xfer->timeout; - int usecs; + int timo; u_int32_t intrs; xfer->status = USBD_IN_PROGRESS; - for (usecs = timo * 1000000 / hz; usecs > 0; usecs -= 1000) { + for (timo = xfer->timeout; timo >= 0; timo--) { usb_delay_ms(&sc->sc_bus, 1); if (sc->sc_dying) break; |