Date: Fri, 29 Feb 2008 18:42:08 +1100 From: Peter Jeremy <peterjeremy@optushome.com.au> To: Yuri <yuri@rawbw.com> Cc: freebsd-hackers@freebsd.org, "J.R. Oldroyd" <fbsd@opal.com> Subject: Re: umass: should the device specific information be moved from C code to the text file? Message-ID: <20080229074208.GT83599@server.vk2pj.dyndns.org> In-Reply-To: <47C73262.1020805@rawbw.com> References: <47C73262.1020805@rawbw.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080229074208.GT83599>