From owner-p4-projects@FreeBSD.ORG Thu Aug 7 16:08:02 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F02801065674; Thu, 7 Aug 2008 16:08:01 +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 B265F106566C for ; Thu, 7 Aug 2008 16:08:01 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from swip.net (mailfe03.swip.net [212.247.154.65]) by mx1.freebsd.org (Postfix) with ESMTP id 468E48FC1F for ; Thu, 7 Aug 2008 16:08:00 +0000 (UTC) (envelope-from hselasky@freebsd.org) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=LFJu_T3GCAQA:10 a=6MIg2jpqvhTpo/gR8GzG7Q==:17 a=6I5d2MoRAAAA:8 a=eeyuck70kjWAbqzC8jMA:9 a=MXWzbH4D18Q8ak04QEEA:7 a=5kAl_ymzYO1WhQwFd4CtDLoGuIwA:4 a=LY0hPdMaydYA:10 Received: from [62.113.133.243] (account mc467741@c2i.net [62.113.133.243] verified) by mailfe03.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1038492065; Thu, 07 Aug 2008 18:07:59 +0200 From: Hans Petter Selasky To: John Baldwin Date: Thu, 7 Aug 2008 18:09:40 +0200 User-Agent: KMail/1.9.7 References: <200807011103.m61B3x2b079270@repoman.freebsd.org> <200808071016.43108.jhb@freebsd.org> In-Reply-To: <200808071016.43108.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808071809.41042.hselasky@freebsd.org> Cc: Perforce Change Reviews Subject: Re: PERFORCE change 144415 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: Thu, 07 Aug 2008 16:08:02 -0000 On Thursday 07 August 2008, John Baldwin wrote: > On Tuesday 01 July 2008 07:03:59 am Hans Petter Selasky wrote: > > http://perforce.freebsd.org/chv.cgi?CH=144415 > > > > Change 144415 by hselasky@hselasky_laptop001 on 2008/07/01 11:03:31 > > > > > > To allow USB drivers using the Giant mutex, like ukbd > > and the tty layer (ucom), condition variable functions > > like mtx_sleep() and cv_wait() needs to support the Giant > > mutex. Previously using the Giant mutex with these functions > > resulted in a panic due to an unlock race between the > > GIANT_DROP macro and the internal mutex unlock in the > > condition variable function. This patch will try to > > resolve that race. > > I'd rather that the sleep and condition variable code just explicitly > handle this case rather than changing DROP_GIANT(). > Hi, I have implemented a set of wrappers for these functions that handle this. See "src/sys/dev/usb2/core/usb2_util.h" in the USB P4 tree. The files that were changed regarding this issue will not be integrated, though they currently remain in the P4 repository. --HPS