From owner-freebsd-usb@FreeBSD.ORG Tue Feb 28 04:20:11 2006 Return-Path: X-Original-To: freebsd-usb@hub.freebsd.org Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6073316A420 for ; Tue, 28 Feb 2006 04:20:11 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 24C2143D46 for ; Tue, 28 Feb 2006 04:20:11 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k1S4KBoU027684 for ; Tue, 28 Feb 2006 04:20:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k1S4KAS6027683; Tue, 28 Feb 2006 04:20:10 GMT (envelope-from gnats) Date: Tue, 28 Feb 2006 04:20:10 GMT Message-Id: <200602280420.k1S4KAS6027683@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Eugene Grosbein Cc: Subject: Re: usb/81524 : panic: usb_cold_explore: busses to explore when !cold X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Eugene Grosbein List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Feb 2006 04:20:11 -0000 The following reply was made to PR usb/81524; it has been noted by GNATS. From: Eugene Grosbein To: Ian Dowse 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