Date: Sat, 07 Feb 2009 11:59:23 +0100 From: Niclas Zeising <niclas.zeising@gmail.com> To: Andrew Thompson <thompsa@FreeBSD.org> 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 Message-ID: <498D698B.5000101@gmail.com> In-Reply-To: <200902070627.n176RGEa083276@svn.freebsd.org> References: <200902070627.n176RGEa083276@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 --
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?498D698B.5000101>