Date: Fri, 15 Jun 2007 17:23:36 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 121703 for review Message-ID: <200706151723.l5FHNaLA060662@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=121703 Change 121703 by hselasky@hselasky_mini_itx on 2007/06/15 17:23:15 Poll the interrupt handler one time after attach/resume to catch any lost interrupts. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/ehci.c#33 edit .. //depot/projects/usb/src/sys/dev/usb/ohci.c#27 edit .. //depot/projects/usb/src/sys/dev/usb/uhci.c#27 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/ehci.c#33 (text+ko) ==== @@ -105,6 +105,7 @@ static usbd_config_td_command_t ehci_root_ctrl_task; static void ehci_root_ctrl_task_td(struct ehci_softc *sc, struct thread *ctd); +static void ehci_do_poll(struct usbd_bus *bus); #define SC_HW_PHYSADDR(sc,what) \ ((sc)->sc_hw_page.physaddr + \ @@ -373,6 +374,11 @@ done: mtx_unlock(&sc->sc_bus.mtx); + + if (!err) { + /* catch any lost interrupts */ + ehci_do_poll(&(sc->sc_bus)); + } return (err); } @@ -531,6 +537,10 @@ mtx_unlock(&sc->sc_bus.mtx); DELAY(1000*USB_RESUME_WAIT); + + /* catch any lost interrupts */ + ehci_do_poll(&(sc->sc_bus)); + return; } ==== //depot/projects/usb/src/sys/dev/usb/ohci.c#27 (text+ko) ==== @@ -121,6 +121,7 @@ static usbd_config_td_command_t ohci_root_ctrl_task; static void ohci_root_ctrl_task_td(struct ohci_softc *sc, struct thread *ctd); +static void ohci_do_poll(struct usbd_bus *bus); #define SC_HW_PHYSADDR(sc,what) \ ((sc)->sc_hw_page.physaddr + \ @@ -379,6 +380,8 @@ else { mtx_unlock(&sc->sc_bus.mtx); + /* catch any lost interrupts */ + ohci_do_poll(&(sc->sc_bus)); return (USBD_NORMAL_COMPLETION); } } @@ -475,6 +478,10 @@ sc->sc_control = sc->sc_intre = 0; mtx_unlock(&sc->sc_bus.mtx); + + /* catch any lost interrupts */ + ohci_do_poll(&(sc->sc_bus)); + return; } ==== //depot/projects/usb/src/sys/dev/usb/uhci.c#27 (text+ko) ==== @@ -138,6 +138,7 @@ static usbd_config_td_command_t uhci_root_ctrl_task; static void uhci_root_ctrl_task_td(struct uhci_softc *sc, struct thread *ctd); +static void uhci_do_poll(struct usbd_bus *bus); void uhci_reset(uhci_softc_t *sc) @@ -439,6 +440,9 @@ mtx_unlock(&sc->sc_bus.mtx); + /* catch lost interrupts */ + uhci_do_poll(&(sc->sc_bus)); + return 0; } @@ -503,6 +507,10 @@ #endif mtx_unlock(&sc->sc_bus.mtx); + + /* catch lost interrupts */ + uhci_do_poll(&(sc->sc_bus)); + return; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200706151723.l5FHNaLA060662>
