From owner-p4-projects@FreeBSD.ORG Fri Jun 15 17:23:37 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0E6F116A46C; Fri, 15 Jun 2007 17:23:37 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D101616A469 for ; Fri, 15 Jun 2007 17:23:36 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id C263313C483 for ; Fri, 15 Jun 2007 17:23:36 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l5FHNao5060669 for ; Fri, 15 Jun 2007 17:23:36 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l5FHNaLA060662 for perforce@freebsd.org; Fri, 15 Jun 2007 17:23:36 GMT (envelope-from hselasky@FreeBSD.org) Date: Fri, 15 Jun 2007 17:23:36 GMT Message-Id: <200706151723.l5FHNaLA060662@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 121703 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jun 2007 17:23:37 -0000 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; }