Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Feb 2006 02:20:06 GMT
From:      Ian Dowse <iedowse@iedowse.com>
To:        freebsd-usb@FreeBSD.org
Subject:   Re: usb/81524 : panic: usb_cold_explore: busses to explore when !cold 
Message-ID:  <200602280220.k1S2K67L018102@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: Ian Dowse <iedowse@iedowse.com>
To: Eugene Grosbein <eugen@grosbein.pp.ru>
Cc: bug-followup@freebsd.org
Subject: Re: usb/81524 : panic: usb_cold_explore: busses to explore when !cold 
Date: Tue, 28 Feb 2006 02:17:07 +0000

 In message <20060227154754.GA396@grosbein.pp.ru>, Eugene Grosbein writes:
 >I've applied your patch to 1.26.2.14 (that's the latest revision
 >in RELENG_4 for now) and it broke my USB. The kernel prints at the boot time:
 >
 >usb_new_device: set address 2 failed - trying a port reset
 >usb_new_device: set address 2 failed - trying a port reset
 >usb_new_device: set address 2 failed - trying a port reset
 >usb_new_device: set address 2 failed
 >uhub_explore: usb_new_device failed, error=SET_ADDR_FAILED
 >uhub0: device problem (SET_ADDR_FAILED), disabling port 1
 
 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200602280220.k1S2K67L018102>