From owner-freebsd-usb@FreeBSD.ORG Tue Dec 23 20:29:41 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF6C91065679 for ; Tue, 23 Dec 2008 20:29:41 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from pele.citylink.co.nz (pele.citylink.co.nz [202.8.44.226]) by mx1.freebsd.org (Postfix) with ESMTP id B439F8FC26 for ; Tue, 23 Dec 2008 20:29:41 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) by pele.citylink.co.nz (Postfix) with ESMTP id E2536FEF7; Wed, 24 Dec 2008 08:56:02 +1300 (NZDT) X-Virus-Scanned: Debian amavisd-new at citylink.co.nz Received: from pele.citylink.co.nz ([127.0.0.1]) by localhost (pele.citylink.co.nz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wdxicd-ngpFn; Wed, 24 Dec 2008 08:55:59 +1300 (NZDT) Received: from citylink.fud.org.nz (unknown [202.8.44.45]) by pele.citylink.co.nz (Postfix) with ESMTP; Wed, 24 Dec 2008 08:55:59 +1300 (NZDT) Received: by citylink.fud.org.nz (Postfix, from userid 1001) id 0C80011430; Wed, 24 Dec 2008 08:55:59 +1300 (NZDT) Date: Tue, 23 Dec 2008 11:55:58 -0800 From: Andrew Thompson To: Hans Petter Selasky Message-ID: <20081223195558.GL89448@citylink.fud.org.nz> References: <20081223175911.GZ1176@hoeg.nl> <200812231956.21666.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200812231956.21666.hselasky@c2i.net> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: Ed Schouten , freebsd-usb@freebsd.org Subject: Re: Giant on serial devices in USB2? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 20:29:42 -0000 On Tue, Dec 23, 2008 at 07:56:21PM +0100, Hans Petter Selasky wrote: > On Tuesday 23 December 2008, Ed Schouten wrote: > > Hello HPS, others, > > > > I was just running a grep on the USB2 code and saw the following: > > > > $ grep -r Giant sys/dev/usb2/serial | wc -l > > 70 > > > > WHat's the exact reason USB2 still uses Giant on TTY related drivers? > > Couldn't it just use the per-TTY mutex? If not, maybe it should create a > > custom system-wide mutex, instead of using Giant? > > > > Yours, > > Hi, > > I don't have all those USB devices at hand, so I simply cannot test if the > driver still works without Giant. > > BTW: It should be trivial to remove Giant from the drivers. I think Andrew > Thompson has already done some drivers Giant-free. Its just a mechanical change, it works fine for the couple of driver I have converted. Andrew