From owner-freebsd-current@FreeBSD.ORG Wed Aug 4 15:08:25 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 00A3616A4CE for ; Wed, 4 Aug 2004 15:08:25 +0000 (GMT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2698143D49 for ; Wed, 4 Aug 2004 15:08:24 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) (authenticated bits=0) i74F8KaI056762 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Wed, 4 Aug 2004 17:08:21 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [IPv6:3ffe:400:8d0:301::12]) by cicely5.cicely.de (8.12.10/8.12.10) with ESMTP id i74F7esu098449 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 4 Aug 2004 17:07:40 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id i74F7dLB049382; Wed, 4 Aug 2004 17:07:39 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id i74F7djE049381; Wed, 4 Aug 2004 17:07:39 +0200 (CEST) (envelope-from ticso) Date: Wed, 4 Aug 2004 17:07:39 +0200 From: Bernd Walter To: Chris Message-ID: <20040804150738.GE20488@cicely12.cicely.de> References: <4110F5AE.6030403@tellme3times.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4110F5AE.6030403@tellme3times.com> X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.9 required=3.0 tests=BAYES_00 autolearn=ham version=2.61 X-Spam-Report: * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on cicely5.cicely.de cc: freebsd-current@freebsd.org Subject: Re: USB drivers X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Aug 2004 15:08:25 -0000 On Wed, Aug 04, 2004 at 10:41:50AM -0400, Chris wrote: > The last time I programed was over 15 years ago and I was thinking of > looking into the USB drivers for FreeBSD concerning multifunction > devices. If I ask stupid questions forgive me because I am seeing this > as a user. > > First I would like to know if there is a technical reason why two > different divers cannot attach to the same device. If each driver works > well independently, what is the reason to prevent the second one from > attaching? I would assume that if you attempted to use both drivers at > the same time you would get a device busy error. USB devices can be designed to have multiple interfaces at which you can have different drivers - e.g. you can have a ulpt/umass combo and both drivers just clain the according interface from the same device. Therefor also drivers can be programmed for whole USB devices and for USB subdevices. This works perfectly with FreeBSD. > Am I misunderstanding something here? I see ulpt: and unlpt: attaching > to the same device and the choice of which one to use is up to the user > and the hardware they have. If we have two drivers attach in one case > why, and where, do we prevent other drivers from attaching if they meet > the minimum requirements? unlpt and ulpt are just different representations from the same driver. There is absolutely no sense in having two clients printing at the same time on the same printer, so blocking each other is absolutely reasonable. Scheduling multiple requests is up to software like lpd. See ulpt(4) for details about the functional difference in ulpt vs. unlpt device nodes - depending on the printer you will likely end up in always using the same devicenode. Why do you think this is wrong? -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de