Date: Tue, 28 Feb 2006 04:20:10 GMT From: Eugene Grosbein <eugen@grosbein.pp.ru> To: freebsd-usb@FreeBSD.org Subject: Re: usb/81524 : panic: usb_cold_explore: busses to explore when !cold Message-ID: <200602280420.k1S4KAS6027683@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR usb/81524; it has been noted by GNATS. From: Eugene Grosbein <eugen@grosbein.pp.ru> To: Ian Dowse <iedowse@iedowse.com> Cc: bug-followup@freebsd.org Subject: Re: usb/81524 : panic: usb_cold_explore: busses to explore when !cold Date: Tue, 28 Feb 2006 11:11:55 +0700 On Tue, Feb 28, 2006 at 02:17:07AM +0000, Ian Dowse wrote: > Oops, I must have missed updating to 1.26.2.14, so I didn't see > that polling mode had been commented out. Could you try this patch > instead? > > Thanks, > > Ian > > Index: usb.c > =================================================================== > RCS file: /home/iedowse/CVS/src/sys/dev/usb/usb.c,v > retrieving revision 1.26.2.14 > diff -u -r1.26.2.14 usb.c > --- usb.c 16 May 2005 09:39:25 -0000 1.26.2.14 > +++ usb.c 28 Feb 2006 02:10:46 -0000 > @@ -961,6 +961,7 @@ > usb_cold_explore(void *arg) > { > struct usb_softc *sc; > + int s; > > KASSERT(cold || TAILQ_EMPTY(&usb_coldexplist), > ("usb_cold_explore: busses to explore when !cold")); > @@ -968,15 +969,17 @@ > sc = TAILQ_FIRST(&usb_coldexplist); > TAILQ_REMOVE(&usb_coldexplist, sc, sc_coldexplist); > > -/* sc->sc_bus->use_polling++; */ > + s = splusb(); > + sc->sc_bus->use_polling++; > sc->sc_port.device->hub->explore(sc->sc_bus->root_hub); > -/* sc->sc_bus->use_polling--; */ > + sc->sc_bus->use_polling--; > + splx(s); > } > } > > DRIVER_MODULE(usb, ohci, usb_driver, usb_devclass, 0, 0); > DRIVER_MODULE(usb, uhci, usb_driver, usb_devclass, 0, 0); > DRIVER_MODULE(usb, ehci, usb_driver, usb_devclass, 0, 0); > -SYSINIT(usb_cold_explore, SI_SUB_INT_CONFIG_HOOKS, SI_ORDER_FIRST, > +SYSINIT(usb_cold_explore, SI_SUB_CONFIGURE, SI_ORDER_MIDDLE, > usb_cold_explore, NULL); > #endif This patch works, thank you! No panics anymore and USB works. Please commit this. Eugene Grosbein
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200602280420.k1S4KAS6027683>