From owner-freebsd-mobile Thu Oct 23 21:31:55 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id VAA20755 for mobile-outgoing; Thu, 23 Oct 1997 21:31:55 -0700 (PDT) (envelope-from owner-freebsd-mobile) Received: from word.smith.net.au (word.smith.net.au [202.0.75.3]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id VAA20736 for ; Thu, 23 Oct 1997 21:31:03 -0700 (PDT) (envelope-from mike@word.smith.net.au) Received: from word.smith.net.au (localhost.smith.net.au [127.0.0.1]) by word.smith.net.au (8.8.7/8.8.5) with ESMTP id NAA01201; Fri, 24 Oct 1997 13:56:50 +0930 (CST) Message-Id: <199710240426.NAA01201@word.smith.net.au> X-Mailer: exmh version 2.0zeta 7/24/97 To: John-Mark Gurney cc: Mike Smith , Nate Williams , mobile@FreeBSD.ORG Subject: Re: Patches from -current for -stable I'd like to commit after testing In-reply-to: Your message of "Thu, 23 Oct 1997 21:14:08 MST." <19971023211408.08161@hydrogen.nike.efn.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 24 Oct 1997 13:56:48 +0930 From: Mike Smith Sender: owner-freebsd-mobile@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > and other possibles values are MOD_UNLOAD and MOD_SHUTDOWN... in the > long run, I think it's much better to seperate the load proccess from > the device driver... I guess we could make a seperate bus for these > sorts of things.. but in my opinion it turns into an overkill... I don't think that it'll ever be possible to avoid having load/unload actions in a device driver module; drivers may want to allocate local storage, and they're the last arbiter as to whether they are ready to be unloaded, so whether you overload "LOAD" as "first probe" and "UNLOAD" as "last close", or make them explicit, the same actions are relevant. If the "kernel registry" stuff ever happens, or any other form of parametric access, there is scope for references into the driver outside the domain of open/close, and you still need a way of cleaning this up. Load/unload hooks are the only way to go. > basicly, as far as I can tell, there are two types of busses... abus > is an address bus... each device is able to be addressed on this bus, > and you are able to uniquely get a key that identifies this device.. > this currently covers eisa, pci, pnp, mca, scsi, pccard, and more... > then there is bbus, which is a bus bus.. everything listens to it and > you have to magicly know what devices are listening.. :) currently only > isa (and possibly vlb) are under this category... they will require > a hard definition somewere for them to work... Hmm, so you are proposing to avoid anything bus-specific in your driver model? ie. the driver provides a 'probe' function if it supports bbus operation, and alwyas provides an 'attach' which is called directly by abus stuff and indirectly as a result of a successful bbus probe? This is very clean. There are a few nasty-ish warts; the data passed to the attach routine will have to allow for opaque registration of interrupt handlers etc. and likewise the structure provided to probe routines will have to be *very* carefully generic, but still this would be a huge improvement. > I was thinking that we could make the table that is dynamicly loaded > that contains the isa bus information.. then to probe some new devices, > a table with that new entry is loaded, and then a bus rescan is started > which will notice the new, unprobed device, and will probe it... If you go back through your archive to the discussions that Stefan, Luigi(?) and I were having on this a few months back, I think So, big question: What can we do to help you with this? mike