From owner-freebsd-hackers Fri Jun 16 20:23:43 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from feral.com (feral.com [192.67.166.1]) by hub.freebsd.org (Postfix) with ESMTP id 183CB37B87F; Fri, 16 Jun 2000 20:23:40 -0700 (PDT) (envelope-from mjacob@feral.com) Received: from semuta.feral.com (semuta [192.67.166.70]) by feral.com (8.9.3/8.9.3) with ESMTP id UAA07316; Fri, 16 Jun 2000 20:23:37 -0700 Date: Fri, 16 Jun 2000 20:23:29 -0700 (PDT) From: Matthew Jacob Reply-To: mjacob@feral.com To: Mike Smith Cc: hackers@freebsd.org Subject: Re: loading modules from within the kernel.... In-Reply-To: <200006142127.OAA00558@mass.cdrom.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG The more I look at the preload way of doing things, the more I see this as something of a lose. What we want to do is to load the fw module if and only if there is h/w for it, and then unload it when we're done. We want to do this w/o user intervention, else why bother (as we could have gotten them to run config compiling in f/w if the want to support this card). What we have the tools for is to get the loader(8) to load it for you, if you request it (i.e., by modifying /boot/loader.conf to specifically *add* it, or by modifying /boot/defaults/loader.conf to make default loaded (leaving to the user to edit /boot/loader.conf to disable the load), plus (I haven't done this step yet) some goop to run around and hand bind it from isp_pci so you can either get at the data directly, or (which I would prefer) get at the function that isp_pci will call which will pass back a pointer to f/w. But there's nothing there to unload this module if you *don't* have the h/w (i.e., all probes for isp fail), unless I stick the PCI lookup info into this module (and it unloads itself... can it? Is there a mechanism where we can mark a container for unloading later so it can be scavenged?). So, what we end up with is more text code, a bunch of new places to touch (like defaults/loader.conf) and nothing to reduce the bloat (which was the whole point of this exercise) if you don't have the h/w. *groan* -matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message