From owner-freebsd-hackers Fri Dec 19 14:01:20 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id OAA23238 for hackers-outgoing; Fri, 19 Dec 1997 14:01:20 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from smtp01.primenet.com (smtp01.primenet.com [206.165.6.131]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id OAA23222 for ; Fri, 19 Dec 1997 14:01:13 -0800 (PST) (envelope-from tlambert@usr05.primenet.com) Received: (from daemon@localhost) by smtp01.primenet.com (8.8.8/8.8.8) id PAA00688; Fri, 19 Dec 1997 15:01:12 -0700 (MST) Received: from usr05.primenet.com(206.165.6.205) via SMTP by smtp01.primenet.com, id smtpd000664; Fri Dec 19 15:01:10 1997 Received: (from tlambert@localhost) by usr05.primenet.com (8.8.5/8.8.5) id PAA17466; Fri, 19 Dec 1997 15:01:06 -0700 (MST) From: Terry Lambert Message-Id: <199712192201.PAA17466@usr05.primenet.com> Subject: Re: converting drivers to dynamic memory... To: julian@whistle.com (Julian Elischer) Date: Fri, 19 Dec 1997 22:01:05 +0000 (GMT) Cc: gurney_j@resnet.uoregon.edu, mike@smith.net.au, avalon@coombs.anu.edu.au, freebsd-hackers@FreeBSD.ORG In-Reply-To: <3499E71A.167EB0E7@whistle.com> from "Julian Elischer" at Dec 18, 97 07:16:42 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > The AIM is that after a cut-over to devfs, > drivers could be modified to take more generalised arguments. > > the minor number can be interpretted as a cookie that can be used to > look something up in a hash-table or similar. > > That's what I do in slice/slice_device.c > the minor number there is just a cookie, that is used to find > a softc structure. In a more generalised situation. > the minor could be used to find a small structure > which in turn contains a pointer to the softc, plus a unique > sub-identifier. > > eventually, the minor number might be interpretted directly as a > pointer to this structure. > > Since teh minor number is supplied by the driver and never > alterable by the user, this is safe. it might also be > possible to make it not print out at all in 'ls' > as that would just be confusing. > > What I'm saying is that the minor number can be interpretted > as the driver sees fit, however in the current system it must > be a static thing and that is very limiting. (not to mention > we only have 24 bits) One thing that kind of concerns me... there will remain a need to be able to NFS export statically generated device nodes of the old style. FreeBSD won't need them, but... you could be net-booting a diskless or dataless client off a FreeBSD box. Such a client would need the traditional device nodes. This is more an issue to deal with mknod, and not necessarily through the provision of a specfs hook in your FS that you are exporting (ie: it's a referential issue that FreeBSD itself can ignore, so long as mknod can make the nodes that the client can interpret through its own specfs). Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.