Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Mar 2005 18:14:07 +0100
From:      Hans Petter Selasky <hselasky@c2i.net>
To:        freebsd-isdn@freebsd.org
Subject:   Re: mechanical i4b cleanups
Message-ID:  <200503011814.08550.hselasky@c2i.net>
In-Reply-To: <20050228180848.GB438@odin.ac.hmc.edu>
References:  <20050226004635.GA2922@odin.ac.hmc.edu> <200502262014.36481.hselasky@c2i.net> <20050228180848.GB438@odin.ac.hmc.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 28 February 2005 19:08, Brooks Davis wrote:
> The man page is actually wrong in 6 and has been for quite some time.
> Since neither peter or I are in a position to do all the work required
> to modernize I4B, the NI4B* values are now options instead of counts.
> As phk said, these should die.
>
> Most of these devices should probably be created when a piece of
> hardware is attached. 

This will create too many unused devices, when there are more than two 
B-channels. Also there might be a problem at detach that one device uses 
devices created by another device. So one would have to keep track of the 
devices created even after detach. And when the device attaches again ...

I looked at some other drivers and noted that some use "cloning" to create new 
devices on demand. This might be possible for /dev/i4btelX and /dev/i4brbchX, 
but not all i4b-devices create devices in /dev. On the other hand, all 
i4b-devices used, must be listed in the isdnd.rc configuration file. So maybe 
isdnd should create the devices it finds in the configuration file, using an 
ioctl to /dev/i4b?

Some consequences of the latter:

- rc scripts must start ppp after isdnd.
- all i4b-devices must provide a function to create a new device given a unit
- all i4b-devices should keep the softc. on a one way linked list, and provide 
a function to search for a softc. given a unit. All referrences to the softc. 
is replaced with this function call. To optimize this, cache the softc. 
pointer in the linktables and in dev->si_drvxxx. 

By default, create unit 0 for all devices ?

Trade a little CPU for functionality ?

> A framework to notify all loaded i4b drivers that 
> hardware has been attached is probably needed.  Hopefully someone who
> cares about ISDN will find time to work on this.
>
> -- Brooks

Yours
--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200503011814.08550.hselasky>