Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Oct 2000 21:13:00 -0400
From:      "Gary T. Corcoran" <gcorcoran@lucent.com>
To:        Terry Lambert <tlambert@primenet.com>
Cc:        freebsd-hackers@FreeBSD.ORG, freebsd-net@FreeBSD.ORG
Subject:   Re: Module parameters?  (WildWire DSL card driver)
Message-ID:  <39EBA79C.26BFFE3@lucent.com>
References:  <200010170053.RAA04059@usr05.primenet.com>

next in thread | previous in thread | raw e-mail | index | archive | help

Terry,

First, thanks for the reply.

> > 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.

Hmmm...  Quite a hack :), but yes it should work.  If all else fails,
I guess I could do this...
 
> Really, it seems to me that if this driver looks like an
> ethernet interface, you should be able to set the parameters
> after the atttach, before bringing the interface up.
...
> One of these aprroaches should be able to work for you; the parameter
> driver approach with a pseudo device will definitely work, but is
> much less elegant (parameters on an attach probably mean that you
> are doing something in an attach that really belongs elsewhere).

One of the problems with supporting DSL is that there are many
"flavors" of protocol that different equipment providers use.
But there are two main divisions, which unfortunately make for a
Jekyl-and-Hyde personality.  The DSL card must either appear as
a LAN device (ethernet interface) or a WAN device (sync PPP device).
Thus, at the moment of attach(), I need to know whether to do an
ether_ifattach() or an sppp_attach().  That's the main reason I
need module parameters.  The other reason I _want_ module parameters
is that Linux provides them, so the Linux flavor of my driver uses
them, and it's easier to keep the drivers in sync with changes if
they are written in a similar manner (since only the Linux driver is
"officially" supported)...  

Gary


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?39EBA79C.26BFFE3>