From owner-freebsd-hackers Thu Oct 19 14: 0:53 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from hoemlsrv.firewall.lucent.com (hoemail1.lucent.com [192.11.226.161]) by hub.freebsd.org (Postfix) with ESMTP id CAF0537B4CF for ; Thu, 19 Oct 2000 14:00:50 -0700 (PDT) Received: from hoemlsrv.firewall.lucent.com (localhost [127.0.0.1]) by hoemlsrv.firewall.lucent.com (Pro-8.9.3/8.9.3) with ESMTP id RAA02361 for ; Thu, 19 Oct 2000 17:00:45 -0400 (EDT) Received: from mhmail.mh.lucent.com (h135-3-115-8.lucent.com [135.3.115.8]) by hoemlsrv.firewall.lucent.com (Pro-8.9.3/8.9.3) with ESMTP id RAA02350; Thu, 19 Oct 2000 17:00:44 -0400 (EDT) Received: from lucent.com (positron.micro.lucent.com [192.19.56.129]) by mhmail.mh.lucent.com (8.8.8+Sun/EMS-1.5 sol2) id RAA23605; Thu, 19 Oct 2000 17:00:43 -0400 (EDT) Message-ID: <39EF60AE.B9498195@lucent.com> Date: Thu, 19 Oct 2000 16:59:26 -0400 From: "Gary T. Corcoran" Organization: Lucent Microelectronics - Client Access Broadband Systems X-Mailer: Mozilla 4.73 [en] (Win95; U) X-Accept-Language: en MIME-Version: 1.0 To: Terry Lambert Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Module parameters? (WildWire DSL card driver) References: <200010170053.RAA04059@usr05.primenet.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Terry Lambert wrote: > > > Back in July I was asking about the capability to set parameters (variables) > > when loading my DSL driver module. There was a small flurry of activity > > about some initial ideas on how to do it, but I never heard any more about > > it. Did you (Mike, Warner, or anybody) have time to work on it? Did this > > capability get put into release 4.1, by any chance? :) > > A common trick "in the old days" was to load a parameter module > that the driver module depended up, and give it a hook that it > could call to get data from the parameter module, by reference > to a statis structure. > > You would send the data down to the parameter module before you > load the driver module; thus: > > 1) Load paramter module > 2) Open parameter module psuedo device > 3) Ioctl parameters up/down via the pseudo device > 4) Load the deriver module > 5) Driver module attach routine call parameter_fetch() > routine out of parameter module > 6) Parameter module returns static parameter structure, > by reference > 7) Driver dereferences parameters out of static struct > 8) Driver completes attach I'm implementing this suggested method, but I have one problem. I don't know what "device" to access to allow me to do ioctl's to it. That is, I've created a parameter module (which loads and is accessible by my driver) - but I don't think that (alone) has created a "device", has it? If so, what is it named? Realize that at step 3, my real device doesn't exist yet, so I can't reference that... Do I need to somehow "create" a (pseudo-)device in my parameter module - and if so how do I do that? Thanks, Gary To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message