Deleted Added
full compact
47c47
< __FBSDID("$FreeBSD: head/sys/dev/usb/controller/ehci.c 198151 2009-10-15 20:07:08Z thompsa $");
---
> __FBSDID("$FreeBSD: head/sys/dev/usb/controller/ehci.c 199058 2009-11-08 20:51:15Z thompsa $");
116,119c116,121
< static void ehci_do_poll(struct usb_bus *bus);
< static void ehci_device_done(struct usb_xfer *xfer, usb_error_t error);
< static uint8_t ehci_check_transfer(struct usb_xfer *xfer);
< static void ehci_timeout(void *arg);
---
> static void ehci_do_poll(struct usb_bus *);
> static void ehci_device_done(struct usb_xfer *, usb_error_t);
> static uint8_t ehci_check_transfer(struct usb_xfer *);
> static void ehci_timeout(void *);
> static void ehci_poll_timeout(void *);
>
245a248
> usb_callout_init_mtx(&sc->sc_tmo_poll, &sc->sc_bus.bus_mtx, 0);
522a526
> usb_callout_stop(&sc->sc_tmo_poll);
534a539
> usb_callout_drain(&sc->sc_tmo_poll);
1474a1480,1501
> /*
> * Some EHCI chips from VIA / ATI seem to trigger interrupts before
> * writing back the qTD status, or miss signalling occasionally under
> * heavy load. If the host machine is too fast, we can miss
> * transaction completion - when we scan the active list the
> * transaction still seems to be active. This generally exhibits
> * itself as a umass stall that never recovers.
> *
> * We work around this behaviour by setting up this callback after any
> * softintr that completes with transactions still pending, giving us
> * another chance to check for completion after the writeback has
> * taken place.
> */
> static void
> ehci_poll_timeout(void *arg)
> {
> ehci_softc_t *sc = arg;
>
> DPRINTFN(3, "\n");
> ehci_interrupt_poll(sc);
> }
>
1541a1569,1573
> if (sc->sc_flags & EHCI_SCFLG_LOSTINTRBUG) {
> usb_callout_reset(&sc->sc_tmo_poll, hz / 128,
> (void *)&ehci_poll_timeout, sc);
> }
>