Date: Sat, 19 Sep 2020 21:45:05 +0200 From: Hans Petter Selasky <hps@selasky.org> To: Mark Millard <marklmi@yahoo.com> Cc: freebsd-arm <freebsd-arm@freebsd.org> Subject: Re: Comment #135 for bugzilla 237666 : a USB3-handling problem with a investigatory fix for a cortex-a72 context Message-ID: <75af04ec-0021-3575-40bf-c5ab9b6d4703@selasky.org> In-Reply-To: <D28FEE99-A2CA-484E-A5E9-312334CF3FE3@yahoo.com> References: <6E618C3D-12DF-429E-A249-5BAB90FC6B15.ref@yahoo.com> <6E618C3D-12DF-429E-A249-5BAB90FC6B15@yahoo.com> <866bd652-5a8b-7500-b1e0-7528c035048b@selasky.org> <F9E8A6A0-619B-4C6F-8485-032B8358B780@yahoo.com> <578faf26-6042-91ec-c639-2bca17105fae@selasky.org> <723E6915-94F5-417C-B4AF-EEEBFBDF6162@yahoo.com> <565258A0-BEE1-48F8-9851-E6C7CF7ADAE7@yahoo.com> <D28FEE99-A2CA-484E-A5E9-312334CF3FE3@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2020-09-19 21:36, Mark Millard wrote: > # svnlite diff /usr/src/sys/dev/usb/controller/xhci.c > Index: /usr/src/sys/dev/usb/controller/xhci.c > =================================================================== > --- /usr/src/sys/dev/usb/controller/xhci.c (revision 363590) > +++ /usr/src/sys/dev/usb/controller/xhci.c (working copy) > @@ -441,6 +441,9 @@ > > DPRINTF("ERSTBA(0)=0x%016llx\n", (unsigned long long)addr); > > +#ifdef __aarch64__ > +__asm __volatile("dsb st" : : : "memory"); > +#endif > XWRITE4(sc, runt, XHCI_ERSTBA_LO(0), (uint32_t)addr); > XWRITE4(sc, runt, XHCI_ERSTBA_HI(0), (uint32_t)(addr >> 32)); > > booted just fine. This is what I expected relative to > initializing for the event ring. Can you replace this with a USB flush call? > Index: xhci.c > =================================================================== > --- xhci.c (revision 365238) > +++ xhci.c (working copy) > @@ -432,6 +432,8 @@ > phwr->hwr_ring_seg[0].qwEvrsTablePtr = htole64(addr); > phwr->hwr_ring_seg[0].dwEvrsTableSize = htole32(XHCI_MAX_EVENTS); > > + usb_bus_mem_flush_all(&sc->sc_bus, &xhci_iterate_hw_softc); > + > DPRINTF("ERDP(0)=0x%016llx\n", (unsigned long long)addr); > > XWRITE4(sc, runt, XHCI_ERDP_LO(0), (uint32_t)addr); --HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?75af04ec-0021-3575-40bf-c5ab9b6d4703>