From owner-freebsd-hackers Sat Dec 20 18:46:41 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id SAA01945 for hackers-outgoing; Sat, 20 Dec 1997 18:46:41 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from word.smith.net.au (ppp7.portal.net.au [202.12.71.107]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id SAA01891 for ; Sat, 20 Dec 1997 18:45:59 -0800 (PST) (envelope-from mike@word.smith.net.au) Received: from word (localhost [127.0.0.1]) by word.smith.net.au (8.8.8/8.8.5) with ESMTP id NAA01912; Sun, 21 Dec 1997 13:10:13 +1030 (CST) Message-Id: <199712210240.NAA01912@word.smith.net.au> X-Mailer: exmh version 2.0zeta 7/24/97 To: John-Mark Gurney cc: Mike Smith , FreeBSD Hackers Subject: Re: converting drivers to dynamic memory... In-reply-to: Your message of "Thu, 18 Dec 1997 06:36:06 -0800." <19971218063606.31535@hydrogen.nike.efn.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 21 Dec 1997 13:10:12 +1030 From: Mike Smith Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > I do not. And you have missed the most obvious (and most widely > > discussed) solution, which various people are already working on. > > so, your saying that the rest of the frame would already exists, it > just needs to be fixed? Framework? Yes, it's almost all there already. When your device is currently operated on, the dev_t value is constructed and passed in to the driver using the values from the device node. That construction will be replaced with the passing in of the devfs token for the node. > > Understand that when DEVFS hits us properly (and all that's holding it > > up now are buggy consumers), dev_t will cease to be what it currently > > is. The dev_t argument is present everywhere that you want to > > reference your device softc. > > ok, if this is the case, can you tell me where this is currently?? I'm not sure what you mean by "where this is". Do you mean "where are the code samples"? There are none yet; they wouldn't fit the current model. > I just looked at sio's devfs_add_devswf... the closest thing was > the passing of it's unit number in, but then it gets or'd with the > flag of what that entry does... PLUS, that "minor" number gets merged > with the major number, so you won't be able to store a void * in there... > > so, two questions, where does devfs does this magic pointer? and how > will it co-exist with passing back the type of device that was opened? The pointer will be stored in the devfs node. I'm not sure I understand what you mean by "the type of device" though. When you create a devfs node, there is an association between the node and the device switch. The functions in the device switch will be passed the devfs token when the node is operated on. > > There will be no major/minor numbers soon. > > so, how long till this happens?? is this going to be completed in the > next few months? This is entirely contingent on the acceptance of devfs as "the way to go", and the encompassing of the various prerequisite tasks (such as persistence and fixing buggy devfs support in drivers). > the reason I ask is that once the bus/device code is writen, I'm going > to have to pretty much rewrite ALL of the device drivers for the new > scheme, and I don't want to do more than I have to... changing how a > function is called is a LOT more work than just changing the internals > of a function... I think that devfs will be a goer for 3.0. I don't know what sort of timetable you're on for your bus restructuring, but I suspect you may be looking at 3.1 for that. mike