From owner-p4-projects@FreeBSD.ORG Sat Jan 10 11:35:45 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4C5E91065674; Sat, 10 Jan 2009 11:35:45 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0BB311065670; Sat, 10 Jan 2009 11:35:45 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe16.swipnet.se [212.247.155.225]) by mx1.freebsd.org (Postfix) with ESMTP id 6CB348FC12; Sat, 10 Jan 2009 11:35:44 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=Eebajf9wwWgA:10 a=nklthdr5v5AUSfVrlghuJA==:17 a=6I5d2MoRAAAA:8 a=cpEYiYxj_F6_3k5pMIAA:9 a=VIs_eT0QLFGJp1hvZx4A:7 a=M7m15PuNcdR9OAfSffOo6Zmbn6sA:4 a=LY0hPdMaydYA:10 Received: from [62.113.132.62] (account mc467741@c2i.net [62.113.132.62] verified) by mailfe16.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 434932729; Sat, 10 Jan 2009 11:35:41 +0100 From: Hans Petter Selasky To: Weongyo Jeong Date: Sat, 10 Jan 2009 11:38:01 +0100 User-Agent: KMail/1.9.7 References: <200901100859.n0A8xdmW025069@repoman.freebsd.org> In-Reply-To: <200901100859.n0A8xdmW025069@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901101138.02533.hselasky@c2i.net> Cc: Perforce Change Reviews Subject: Re: PERFORCE change 155896 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 11:35:46 -0000 On Saturday 10 January 2009, Weongyo Jeong wrote: > http://perforce.freebsd.org/chv.cgi?CH=155896 > > Change 155896 by weongyo@weongyo_ws on 2009/01/10 08:59:26 > > In USB 2.0 specification The USB System Software should guarantees > a minumum of 10ms for reset recovery but it looks the USB1 framework > doesn't follow it. So it looks sometimes it failed to re-attach or > reenumerate devices after the device reset. > > With this patch, the fw loading operation of uath(4) works. > > Affected files ... > > .. //depot/projects/vap/sys/dev/usb/usb.c#8 edit > Hi, This is not the right place to patch. I think this delay belongs somewhere in "uhub.c". Please search for the following defines in the code: #define USB_PORT_RESET_DELAY 50 /* ms */ #define USB_PORT_ROOT_RESET_DELAY 250 /* ms */ #define USB_PORT_RESET_RECOVERY 250 /* ms */ There should already be a delay there. Maybe you need to increase one of these macros. --HPS > Differences ... > > ==== //depot/projects/vap/sys/dev/usb/usb.c#8 (text+ko) ==== > > @@ -725,6 +725,7 @@ > while (sc->sc_bus->needs_explore && !sc->sc_dying) { > sc->sc_bus->needs_explore = 0; > splx(s); > + usbd_delay_ms(sc->sc_bus->root_hub, 10); > sc->sc_bus->root_hub->hub->explore(sc->sc_bus->root_hub); > s = splusb(); > }