From owner-p4-projects@FreeBSD.ORG Sat Jun 6 04:27:05 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9C2101065670; Sat, 6 Jun 2009 04:27:04 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C0A6106566C for ; Sat, 6 Jun 2009 04:27:04 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 197808FC14 for ; Sat, 6 Jun 2009 04:27:04 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n564R3hG028132 for ; Sat, 6 Jun 2009 04:27:03 GMT (envelope-from thompsa@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n564R3G0028130 for perforce@freebsd.org; Sat, 6 Jun 2009 04:27:03 GMT (envelope-from thompsa@freebsd.org) Date: Sat, 6 Jun 2009 04:27:03 GMT Message-Id: <200906060427.n564R3G0028130@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to thompsa@freebsd.org using -f From: Andrew Thompson To: Perforce Change Reviews Cc: Subject: PERFORCE change 163626 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: Sat, 06 Jun 2009 04:27:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=163626 Change 163626 by thompsa@thompsa_burger on 2009/06/06 04:26:45 - assert locks on load - remove printf - remove double queue Affected files ... .. //depot/projects/usb_buf/src/sys/dev/usb/controller/ehci.c#12 edit Differences ... ==== //depot/projects/usb_buf/src/sys/dev/usb/controller/ehci.c#12 (text+ko) ==== @@ -2201,10 +2201,9 @@ /* dequeue transfer */ usb2_transfer_done(urb, error); - /* Load next */ + /* load next */ urb = TAILQ_FIRST(&pipe->urb_hc_q); if (error == 0 && urb != NULL) { - printf("LOAD NEXT %p\n", urb); TAILQ_REMOVE(&pipe->urb_hc_q, urb, ub_hcnext); error = (pipe->methods->load)(urb); if (error) @@ -2276,12 +2275,11 @@ ehci_softc_t *sc = EHCI_BUS2SC(pipe->xroot->bus); uint32_t temp; + USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); + /* setup TD's and QH */ ehci_setup_standard_chain(urb, &sc->sc_async_p_last); - /* put transfer on interrupt queue */ - ehci_transfer_intr_enqueue(urb); - /* XXX Performance quirk: Some Host Controllers have a too low * interrupt rate. Issue an IAAD to stimulate the Host * Controller after queueing the BULK transfer. @@ -2327,6 +2325,8 @@ struct usb_pipe *pipe = urb->ub_pipe; ehci_softc_t *sc = EHCI_BUS2SC(pipe->xroot->bus); + USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); + /* setup TD's and QH */ ehci_setup_standard_chain(urb, &sc->sc_async_p_last); @@ -2425,6 +2425,8 @@ struct usb_pipe *pipe = urb->ub_pipe; ehci_softc_t *sc = EHCI_BUS2SC(pipe->xroot->bus); + USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); + /* setup TD's and QH */ ehci_setup_standard_chain(urb, &sc->sc_intr_p_last[pipe->qh_pos]); @@ -2524,6 +2526,8 @@ #endif + USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); + DPRINTFN(6, "urb=%p next=%d nframes=%d\n", urb, pipe->endpoint->isoc_next, urb->nframes); @@ -2814,6 +2818,8 @@ #endif + USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); + DPRINTFN(6, "urb=%p next=%d nframes=%d\n", urb, pipe->endpoint->isoc_next, urb->nframes);