From owner-freebsd-isdn@FreeBSD.ORG Tue Mar 1 17:13:33 2005 Return-Path: Delivered-To: freebsd-isdn@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4DC0416A4CE for ; Tue, 1 Mar 2005 17:13:33 +0000 (GMT) Received: from swip.net (mailfe01.swip.net [212.247.154.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id E51EF43D5D for ; Tue, 1 Mar 2005 17:13:31 +0000 (GMT) (envelope-from hselasky@c2i.net) X-T2-Posting-ID: Y1QAsIk9O44SO+J/q9KNyQ== Received: from mp-217-198-180.daxnet.no ([193.217.198.180] verified) by mailfe01.swip.net (CommuniGate Pro SMTP 4.2.9) with ESMTP id 309520589 for freebsd-isdn@freebsd.org; Tue, 01 Mar 2005 18:13:24 +0100 From: Hans Petter Selasky To: freebsd-isdn@freebsd.org Date: Tue, 1 Mar 2005 18:14:07 +0100 User-Agent: KMail/1.7 References: <20050226004635.GA2922@odin.ac.hmc.edu> <200502262014.36481.hselasky@c2i.net> <20050228180848.GB438@odin.ac.hmc.edu> In-Reply-To: <20050228180848.GB438@odin.ac.hmc.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200503011814.08550.hselasky@c2i.net> Subject: Re: mechanical i4b cleanups X-BeenThere: freebsd-isdn@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: hselasky@c2i.net List-Id: Using ISDN with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Mar 2005 17:13:33 -0000 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