From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 29 07:42:15 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED36D1065672 for ; Fri, 29 Feb 2008 07:42:15 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au [211.29.132.186]) by mx1.freebsd.org (Postfix) with ESMTP id 06D508FC29 for ; Fri, 29 Feb 2008 07:42:14 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from server.vk2pj.dyndns.org (c220-239-20-82.belrs4.nsw.optusnet.com.au [220.239.20.82]) by mail05.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m1T7gAv0013153 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 29 Feb 2008 18:42:12 +1100 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.2/8.14.1) with ESMTP id m1T7gA94062721; Fri, 29 Feb 2008 18:42:10 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.2/8.14.2/Submit) id m1T7g8wg062720; Fri, 29 Feb 2008 18:42:08 +1100 (EST) (envelope-from peter) Date: Fri, 29 Feb 2008 18:42:08 +1100 From: Peter Jeremy To: Yuri Message-ID: <20080229074208.GT83599@server.vk2pj.dyndns.org> References: <47C73262.1020805@rawbw.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PkEWctFf+8E2rcii" Content-Disposition: inline In-Reply-To: <47C73262.1020805@rawbw.com> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-hackers@freebsd.org, "J.R. Oldroyd" Subject: Re: umass: should the device specific information be moved from C code to the text file? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Feb 2008 07:42:16 -0000 --PkEWctFf+8E2rcii Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 28, 2008 at 02:14:58PM -0800, Yuri wrote: >Currently all devices supported by umass driver are listed in >* sys/dev/usb/usbdevs > - which has vendor table (vendor-id/name) > - and product table (ref-to-vendor-id/product-id/name) >and >* sys/dev/usb/umass.c > - which has some per-device flags. And (for completeness): * src/sys/cam/scsi/scsi_da.c - contains device quirks. >I suggest device specific information should be moved from=20 >sys/dev/usb/usbdevs and sys/dev/usb/umass.c >to some text file (ex. /etc/umass-devices) which would be read by umass=20 >driver when it's loaded. This sounds like a nice idea - it's also a nuisance having to recompile the kernel just to support a weird new USB device you've acquired. Unfortunately, accessing the filesystem from within the kernel is not that easy. One problem with your suggestion of accessing the file when umass is "loaded" is that if imass is compiled into the kernel, it will go through the probe/attach phase before there's a root filesystem - which makes reading files somewhat difficult. What might be more useful is for the USB system to interrogate a file (or similar) when a USB device is inserted to allow the user to control which usb driver gains control of the device - as well as the camera example you use, this would also be useful with multi-function printer/scanner/... devices. Again, accessing a file is not trivial but may be practical. --=20 Peter Jeremy Please excuse any delays as the result of my ISP's inability to implement an MTA that is either RFC2821-compliant or matches their claimed behaviour. --PkEWctFf+8E2rcii Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFHx7dQ/opHv/APuIcRAh6JAJ9Vxzg86CJGZBJI91dkQGEGHVwdmACfRTh5 fVf09ImGND3yd9JdfeYZuqA= =zRn2 -----END PGP SIGNATURE----- --PkEWctFf+8E2rcii--