From owner-freebsd-current@FreeBSD.ORG Thu Nov 20 03:22:27 2003 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 7A36F16A4CF for ; Thu, 20 Nov 2003 03:22:27 -0800 (PST) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id AADD843FB1 for ; Thu, 20 Nov 2003 03:22:25 -0800 (PST) (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) hAKBMGvq042729 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Thu, 20 Nov 2003 12:22:22 +0100 (CET) (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 hAKBME2q044694 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 20 Nov 2003 12:22:14 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.10/8.12.10) with ESMTP id hAKBMD2u073471; Thu, 20 Nov 2003 12:22:13 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.10/8.12.10/Submit) id hAKBMBQ2073470; Thu, 20 Nov 2003 12:22:11 +0100 (CET) (envelope-from ticso) Date: Thu, 20 Nov 2003 12:22:11 +0100 From: Bernd Walter To: Jeff Walters Message-ID: <20031120112210.GD66808@cicely12.cicely.de> References: <200311182012.49724.jeff@walters.name> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200311182012.49724.jeff@walters.name> X-Operating-System: FreeBSD cicely12.cicely.de 5.1-CURRENT alpha User-Agent: Mutt/1.5.4i cc: current@freebsd.org Subject: Re: Multifunction USB devices 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: Thu, 20 Nov 2003 11:22:27 -0000 On Tue, Nov 18, 2003 at 08:12:49PM -0500, Jeff Walters wrote: > > I have an Epson printer/scanner combo device (CX5200) which works just > fine either as a printer or as a scanner (when I add the vendor and > product codes to usbdevs and uscanner.c) but not both simultaneously. > Currently I compile ulpt and my customized uscanner as modules, and > to switch functions I power the device off, unload/load the > appropriate kernel module, and power the device back on. > > I'm assuming a patch to add the CX5200 vendor/device codes to usbdevs > and uscanner.c in the way I'm doing wouldn't be accepted into CURRENT > since the resulting usage of it is a bit of a hack. Is that right? The right fix would be to convert uscanner into a function level driver for scanner combinations - currently it's a device level driver. ulpt does the right thing. Compare USB_MATCH and USB_ATTACH functions to get an idea about the difference. Adding device identification to uscanner is required anyway, because there is no class definition for scanners. > I wouldn't mind doing work over the next few months to create proper > simultaneous support for both devices if it can be done with a > reasonable level of effort and I can find some sources of > information, and I can get some guidance from an experienced > committer or architect to help do it right the first time. Where > should I go for discussion? I'd like to learn ie. should I work to > combine ulpt and uscanner into some kind of single umulti type of > device driver, or should a virtual hub device of some kind be created > to support both ulpt and uscanner simultaneously as-is (one USB > endpoint, multiple interfaces), or should the system simply continue > searching after matching a USB device, or will this be OBE with some > other USB work going on, etc. -- B.Walter BWCT http://www.bwct.de ticso@bwct.de info@bwct.de