From owner-p4-projects@FreeBSD.ORG Thu Aug 7 16:45:03 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 412091065684; Thu, 7 Aug 2008 16:45:03 +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 03D65106566C; Thu, 7 Aug 2008 16:45:03 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 7855B8FC1D; Thu, 7 Aug 2008 16:45:02 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.2/8.14.2) with ESMTP id m77GiioI017978; Thu, 7 Aug 2008 12:44:55 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Hans Petter Selasky Date: Thu, 7 Aug 2008 12:26:20 -0400 User-Agent: KMail/1.9.7 References: <200807011103.m61B3x2b079270@repoman.freebsd.org> <200808071016.43108.jhb@freebsd.org> <200808071809.41042.hselasky@freebsd.org> In-Reply-To: <200808071809.41042.hselasky@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808071226.20553.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Thu, 07 Aug 2008 12:44:56 -0400 (EDT) X-Virus-Scanned: ClamAV 0.93.1/7972/Thu Aug 7 08:22:20 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx 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:45:03 -0000 On Thursday 07 August 2008 12:09:40 pm Hans Petter Selasky wrote: > 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. Well, the tty stuff and CAM both need to use Giant in this way as well (CAM currently has a local hack in CAM). I can just work on it though. -- John Baldwin