Date: Mon, 9 Dec 2002 23:42:37 +0100 From: Bernd Walter <ticso@cicely8.cicely.de> To: Ian Dowse <iedowse@maths.tcd.ie> Cc: Josef Karthauser <joe@FreeBSD.org>, Nate Lawson <nate@root.org>, cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/usb ohci.c Message-ID: <20021209224236.GF14089@cicely8.cicely.de> In-Reply-To: <200212092048.aa11342@salmon.maths.tcd.ie> References: <20021209202103.GA658@genius.tao.org.uk> <200212092048.aa11342@salmon.maths.tcd.ie>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Dec 09, 2002 at 08:48:55PM +0000, Ian Dowse wrote: > In message <20021209202103.GA658@genius.tao.org.uk>, Josef Karthauser writes: > >On Mon, Dec 09, 2002 at 11:58:09AM -0800, Nate Lawson wrote: > >> On Sun, 8 Dec 2002, Josef Karthauser wrote: > >> > MFNetBSD: (partial 1.133) > >> > - In ohci_close_pipe, wait 1ms after removing an ED to avoid possible > >> > race > >> > condition. > >> > Approved by: re (rwatson) > >> > >> Wouldn't it be better to use a mtx or tsleep/wakeup? A delay leaves the > >> race, only making it non-deterministic. > > >Probably, got a patch :)? > > I haven't looked at the code, but I suspect it is to avoid a race > with the USB hardware, since each usb frame lasts for 1ms. Exactly. It waits for the hardware to finish using the ED before it is freed. The right way would be to wait for the next start of frame, but it's difficult to do correct. With just the wait the only risc is to wait a bit longer than required. -- B.Walter COSMO-Project http://www.cosmo-project.de ticso@cicely.de Usergroup info@cosmo-project.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021209224236.GF14089>