Date: Fri, 1 Jul 2016 09:20:40 +0200 From: Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= <trasz@FreeBSD.org> To: Hans Petter Selasky <hps@selasky.org> Cc: "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org> Subject: Re: DWC OTG patch to test Message-ID: <20160701072040.GA4113@brick> In-Reply-To: <b6dd5aba-bde0-c2c5-103b-b814bc9579ea@selasky.org> References: <b6dd5aba-bde0-c2c5-103b-b814bc9579ea@selasky.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Works perfectly, thanks! On 0630T2259, Hans Petter Selasky wrote: > Hi, > > The attached patch should fix detection of USB detach, if you connect a > USB device directly to the RPI, not via the built-in USB HUB, for > example using RPI-zero. If you have a RPI-zero running FreeBSD - please > test. > > --HPS > Index: sys/dev/usb/controller/dwc_otg.c > =================================================================== > --- sys/dev/usb/controller/dwc_otg.c (revision 300199) > +++ sys/dev/usb/controller/dwc_otg.c (working copy) > @@ -2985,7 +2985,8 @@ > else > sc->sc_flags.status_bus_reset = 0; > > - if (hprt & HPRT_PRTENCHNG) > + if ((hprt & HPRT_PRTENCHNG) && > + (hprt & HPRT_PRTENA) == 0) > sc->sc_flags.change_enabled = 1; > > if (hprt & HPRT_PRTENA) > @@ -4745,6 +4746,8 @@ > > value = 0; > > + if (sc->sc_flags.change_enabled) > + value |= UPS_C_PORT_ENABLED; > if (sc->sc_flags.change_connect) > value |= UPS_C_CONNECT_STATUS; > if (sc->sc_flags.change_suspend)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160701072040.GA4113>