diff options
author | n_hibma <n_hibma@FreeBSD.org> | 1999-03-22 19:52:28 +0000 |
---|---|---|
committer | n_hibma <n_hibma@FreeBSD.org> | 1999-03-22 19:52:28 +0000 |
commit | 7dfa9c591c3907b738714943fba6ad6eb76067bc (patch) | |
tree | 9ac0eae57a427936f642b5e756d8d4c69f0c6484 | |
parent | fbf7e67973487d623739b8bf1b6896396a7d3bf9 (diff) | |
download | FreeBSD-src-7dfa9c591c3907b738714943fba6ad6eb76067bc.zip FreeBSD-src-7dfa9c591c3907b738714943fba6ad6eb76067bc.tar.gz |
Moved timeout initialisation a bit earlier in the process. The
untimeout function triggered panics once in a while.
-rw-r--r-- | sys/dev/usb/uhci.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c index 42c99b7..fe08096 100644 --- a/sys/dev/usb/uhci.c +++ b/sys/dev/usb/uhci.c @@ -548,6 +548,9 @@ uhci_alloc_intr_info(sc) ii = malloc(sizeof(uhci_intr_info_t), M_USBDEV, M_NOWAIT); } ii->sc = sc; +#if defined(__FreeBSD__) + callout_handle_init(&ii->timeout_handle); +#endif return ii; } @@ -1239,6 +1242,9 @@ uhci_device_bulk_start(reqh) ii->reqh = reqh; ii->stdstart = xfer; ii->stdend = xferend; +#if defined(__FreeBSD__) + callout_handle_init(&ii->timeout_handle); +#endif #ifdef DIAGNOSTIC ii->isdone = 0; #endif @@ -1254,10 +1260,6 @@ uhci_device_bulk_start(reqh) if (reqh->timeout && !sc->sc_bus.use_polling) { usb_timeout(uhci_timeout, ii, MS_TO_TICKS(reqh->timeout), ii->timeout_handle); -#if defined(__FreeBSD__) - } else { - callout_handle_init(&ii->timeout_handle); -#endif } splx(s); @@ -1594,6 +1596,9 @@ uhci_device_request(reqh) ii->reqh = reqh; ii->stdstart = setup; ii->stdend = stat; +#if defined(__FreeBSD__) + callout_handle_init(&ii->timeout_handle); +#endif #ifdef DIAGNOSTIC ii->isdone = 0; #endif @@ -1634,10 +1639,6 @@ uhci_device_request(reqh) if (reqh->timeout && !sc->sc_bus.use_polling) { usb_timeout(uhci_timeout, ii, MS_TO_TICKS(reqh->timeout), ii->timeout_handle); -#if defined(__FreeBSD__) - } else { - callout_handle_init(&ii->timeout_handle); -#endif } splx(s); |