From owner-svn-src-head@FreeBSD.ORG Sat Feb 7 10:59:35 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD57D106566C; Sat, 7 Feb 2009 10:59:35 +0000 (UTC) (envelope-from niclas.zeising@gmail.com) Received: from mxf1.bahnhof.se (mxf1.bahnhof.se [213.80.101.25]) by mx1.freebsd.org (Postfix) with ESMTP id 8DC588FC22; Sat, 7 Feb 2009 10:59:35 +0000 (UTC) (envelope-from niclas.zeising@gmail.com) Received: from localhost (mxf1.local [127.0.0.1]) by mxf1-reinject (Postfix) with ESMTP id 7D2005DC0; Sat, 7 Feb 2009 11:59:33 +0100 (CET) X-Virus-Scanned: by amavisd-new using ClamAV at bahnhof.se (MXF1) X-Spam-Score: 2.777 X-Spam-Level: ** X-Spam-Status: No, score=2.777 tagged_above=-99 required=5 tests=[DNS_FROM_RFC_POST=1.708, SPF_NEUTRAL=1.069] Received: from mxf1.bahnhof.se ([127.0.0.1]) by localhost (mxf1.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VZYn3HbEzpIQ; Sat, 7 Feb 2009 11:59:32 +0100 (CET) Received: from [10.0.0.3] (h-85-24-219-30.NA.cust.bahnhof.se [85.24.219.30]) by mxf1.bahnhof.se (Postfix) with ESMTP id 225FC5DBE; Sat, 7 Feb 2009 11:59:32 +0100 (CET) Received: from 127.0.0.1 (AVG SMTP 8.0.233 [270.10.18/1935]); Sat, 07 Feb 2009 11:59:23 +0100 Message-ID: <498D698B.5000101@gmail.com> Date: Sat, 07 Feb 2009 11:59:23 +0100 From: Niclas Zeising User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: Andrew Thompson References: <200902070627.n176RGEa083276@svn.freebsd.org> In-Reply-To: <200902070627.n176RGEa083276@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r188273 - head/sys/dev/usb2/controller X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Feb 2009 10:59:36 -0000 Andrew Thompson wrote: > Author: thompsa > Date: Sat Feb 7 06:27:16 2009 > New Revision: 188273 > URL: http://svn.freebsd.org/changeset/base/188273 > > Log: > Dont hold the lock over the controller init, we are still attaching. > > Modified: > head/sys/dev/usb2/controller/ehci2.c > head/sys/dev/usb2/controller/ohci2.c > head/sys/dev/usb2/controller/uhci2.c > > Modified: head/sys/dev/usb2/controller/ehci2.c > ============================================================================== > --- head/sys/dev/usb2/controller/ehci2.c Sat Feb 7 05:41:24 2009 (r188272) > +++ head/sys/dev/usb2/controller/ehci2.c Sat Feb 7 06:27:16 2009 (r188273) > @@ -223,8 +223,6 @@ ehci_init(ehci_softc_t *sc) > uint16_t bit; > usb2_error_t err = 0; > > - USB_BUS_LOCK(&sc->sc_bus); > - > DPRINTF("start\n"); > > usb2_callout_init_mtx(&sc->sc_tmo_pcd, &sc->sc_bus.bus_mtx, 0); > @@ -259,10 +257,12 @@ ehci_init(ehci_softc_t *sc) > /* Reset the controller */ > DPRINTF("%s: resetting\n", device_get_nameunit(sc->sc_bus.bdev)); > > + USB_BUS_LOCK(&sc->sc_bus); > err = ehci_hc_reset(sc); > + USB_BUS_UNLOCK(&sc->sc_bus); > if (err) { > device_printf(sc->sc_bus.bdev, "reset timeout\n"); > - goto done; > + return (error); ^^^^^^^^^^^^^^^ This broke the build. I'm not familiar with the code, but might it be err you want to return since you set it a bit earlier, and it is of the correct type. [SNIP the rest of the diff] Regards! //Niclas --