From owner-freebsd-isdn@FreeBSD.ORG Mon Feb 28 18:07:56 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 D60CC16A4CE for ; Mon, 28 Feb 2005 18:07:56 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9A13743D54 for ; Mon, 28 Feb 2005 18:07:56 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id j1SI8mMd003468; Mon, 28 Feb 2005 10:08:48 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j1SI8muZ003467; Mon, 28 Feb 2005 10:08:48 -0800 Date: Mon, 28 Feb 2005 10:08:48 -0800 From: Brooks Davis To: Hans Petter Selasky Message-ID: <20050228180848.GB438@odin.ac.hmc.edu> References: <20050226004635.GA2922@odin.ac.hmc.edu> <200502262014.36481.hselasky@c2i.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uZ3hkaAS1mZxFaxD" Content-Disposition: inline In-Reply-To: <200502262014.36481.hselasky@c2i.net> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu cc: Brooks Davis cc: freebsd-isdn@freebsd.org Subject: Re: mechanical i4b cleanups X-BeenThere: freebsd-isdn@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Using ISDN with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Feb 2005 18:07:57 -0000 --uZ3hkaAS1mZxFaxD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Feb 26, 2005 at 08:14:33PM +0100, Hans Petter Selasky wrote: > On Saturday 26 February 2005 01:46, Brooks Davis wrote: > > Below are some fairly mechanical patches I did 6-9 months ago to drag > > some of i4b's drivers in the direction of a modern implementation. I > > don't have the ability to test them and I don't have time to work on > > them. Perhaps someone here does. > > > > The patches are also at: > > > > http://people.freebsd.org/~brooks/patches/i4b.diff >=20 > If you want to modulize the devices in i4b/drivers you need some kind of= =20 > i4b_driver_attach() routine, to perform linking. >=20 > What mechanisms exist to initialize variables in a module or kernel durin= g=20 > load, hence you want to have NI4BXXX stored in a variable? >=20 > The manual pages in /usr/src/usr.sbin/i4b/man/ still say that you have to= =20 > enter a count after "device i4bxxx", instead of using the new "option=20 > NI4BXXX=3Dcount" to set the number of device units. I think one should ke= ep the=20 > "device i4bxxx unit_number" syntax, because then the user is made aware t= hat=20 > the device requires a unit number. When the number of device units is=20 > unknown, and not directly depending on the number of hardware units prese= nt, =20 > the kernel should keep a table of settable unit numbers in a special=20 > data-section, initialized with default values, reachable by the kernel- = and=20 > module- loaders ?? 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. 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 --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --uZ3hkaAS1mZxFaxD Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFCI14vXY6L6fI4GtQRAggZAJwJwWiZ/4Lzbaq7+0zPd66OJNgVsgCeINNV vEGPv3OHcwg3dyJ/jxa/Nhs= =dg0p -----END PGP SIGNATURE----- --uZ3hkaAS1mZxFaxD-- From owner-freebsd-isdn@FreeBSD.ORG Mon Feb 28 19:00:08 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 F185A16A4CE for ; Mon, 28 Feb 2005 19:00:08 +0000 (GMT) Received: from transport.cksoft.de (transport.cksoft.de [62.111.66.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5237E43D46 for ; Mon, 28 Feb 2005 19:00:08 +0000 (GMT) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from transport.cksoft.de (localhost [127.0.0.1]) by transport.cksoft.de (Postfix) with ESMTP id 6D84C1FF931; Mon, 28 Feb 2005 20:00:07 +0100 (CET) Received: by transport.cksoft.de (Postfix, from userid 66) id 313411FF91D; Mon, 28 Feb 2005 20:00:05 +0100 (CET) Received: by mail.int.zabbadoz.net (Postfix, from userid 1060) id 511FE1538C; Mon, 28 Feb 2005 18:59:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.int.zabbadoz.net (Postfix) with ESMTP id 46C7615380; Mon, 28 Feb 2005 18:59:16 +0000 (UTC) Date: Mon, 28 Feb 2005 18:59:16 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@e0-0.zab2.int.zabbadoz.net To: Brooks Davis In-Reply-To: <20050228180848.GB438@odin.ac.hmc.edu> Message-ID: References: <20050226004635.GA2922@odin.ac.hmc.edu> <200502262014.36481.hselasky@c2i.net> <20050228180848.GB438@odin.ac.hmc.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS cksoft-s20020300-20031204bz on transport.cksoft.de cc: freebsd-isdn@freebsd.org Subject: Re: mechanical i4b cleanups X-BeenThere: freebsd-isdn@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Using ISDN with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Feb 2005 19:00:09 -0000 On Mon, 28 Feb 2005, Brooks Davis wrote: Hi, > hardware has been attached is probably needed. Hopefully someone who > cares about ISDN will find time to work on this. for appropriate values of "care"; but I am usually patching i4b atm for another thing and to just get it compile on amd64... -- Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT 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 From owner-freebsd-isdn@FreeBSD.ORG Thu Mar 3 14:29:36 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 DE7CA16A4CE for ; Thu, 3 Mar 2005 14:29:36 +0000 (GMT) Received: from mail.gmx.net (pop.gmx.net [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 05B4843D1F for ; Thu, 3 Mar 2005 14:29:36 +0000 (GMT) (envelope-from marcus.franke@gmx.net) Received: (qmail invoked by alias); 03 Mar 2005 14:29:33 -0000 Received: from unknown (EHLO marcus) (85.183.128.34) by mail.gmx.net (mp003) with SMTP; 03 Mar 2005 15:29:33 +0100 X-Authenticated: #2389389 From: Marcus Franke To: freebsd-isdn@freebsd.org Content-Type: text/plain Date: Thu, 03 Mar 2005 15:29:35 +0100 Message-Id: <1109860175.81403.22.camel@marcus> Mime-Version: 1.0 X-Mailer: Evolution 2.0.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Subject: Problems with an AVM B1 card X-BeenThere: freebsd-isdn@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Using ISDN with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Mar 2005 14:29:37 -0000 Hello, today I plugged an AVM B1 card in my box and still have some problems trying to configure it under FreeBSD 5.3. For a first quick'n'dirty config I just did a cat /usr/share/examples/isdn/KERNEL >> MYKERN Tyring to compile this, exited with an error, as the device definitions doesn't seem to compatible with the 5.3 kernel. I got the following errors: config: Error: device "isic" does not take a count config: Error: device "iwic" does not take a count config: Error: device "ifpi" does not take a count config: Error: device "ifpi2" does not take a count config: Error: device "ihfc" does not take a count config: Error: device "itjc" does not take a count config: Error: device "ifpnp" does not take a count config: Error: device "iavc" does not take a count I removed all except the iavc definitions from my config and from the line: device iavc 4 I removed the "4" and the error vanished, I was told in another list, that the kernel doesn't need anymore those numbers for the instances, it does it automatically now. But now I get another error, which I seem to be unable to find a solution for and hope you can enlighten me :) Linking the kernel dies with the following errors now: linking kernel i4b_ctl.o(.text+0x136): In function `i4bctlioctl': : undefined reference to `i4b_l1_debug' i4b_ctl.o(.text+0x15f): In function `i4bctlioctl': : undefined reference to `i4b_l1_debug' i4b_l2.o(.text+0x1e6): In function `i4b_ph_activate_ind': : undefined reference to `i4b_l1_debug' i4b_l2.o(.text+0x22a): In function `i4b_ph_deactivate_ind': : undefined reference to `i4b_l1_debug' i4b_l2.o(.text+0x359): In function `i4b_mph_status_ind': : undefined reference to `i4b_l1_debug' i4b_l2.o(.text+0x4fd): In function `i4b_mdl_command_req': : undefined reference to `i4b_l1l2_func' i4b_uframe.o(.text+0x498): In function `i4b_tx_sabme': : undefined reference to `i4b_l1l2_func' i4b_uframe.o(.text+0x4e4): In function `i4b_tx_dm': : undefined reference to `i4b_l1l2_func' i4b_uframe.o(.text+0x530): In function `i4b_tx_disc': : undefined reference to `i4b_l1l2_func' i4b_uframe.o(.text+0x57c): In function `i4b_tx_ua': : undefined reference to `i4b_l1l2_func' i4b_uframe.o(.text+0x5cb): more undefined references to `i4b_l1l2_func' follow *** Error code 1 Am I missing something? I did a cvsup today before trying to build the new kernel, so source tree should be uptodate. Marcus From owner-freebsd-isdn@FreeBSD.ORG Thu Mar 3 15:06:49 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 C921316A4CE for ; Thu, 3 Mar 2005 15:06:49 +0000 (GMT) Received: from mail.gmx.net (mail.gmx.de [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 9DC0443D60 for ; Thu, 3 Mar 2005 15:06:47 +0000 (GMT) (envelope-from punky@gmx.ch) Received: (qmail invoked by alias); 03 Mar 2005 15:06:46 -0000 Received: from p213.54.72.213.tisdip.tiscali.de (EHLO paranormal.tonn.local) (213.54.72.213) by mail.gmx.net (mp023) with SMTP; 03 Mar 2005 16:06:46 +0100 X-Authenticated: #1975484 Date: Thu, 3 Mar 2005 16:06:32 +0100 From: Johannes Tonn X-Priority: 3 (Normal) Message-ID: <588444010.20050303160632@gmx.ch> To: freebsd-isdn@freebsd.org In-Reply-To: <1109860175.81403.22.camel@marcus> References: <1109860175.81403.22.camel@marcus> User-Agent: Die Fledermaus MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Subject: Re: Problems with an AVM B1 card X-BeenThere: freebsd-isdn@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Using ISDN with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Mar 2005 15:06:49 -0000 > today I plugged an AVM B1 card in my box and still have > some problems trying to configure it under FreeBSD 5.3. > For a first quick'n'dirty config I just did a > cat /usr/share/examples/isdn/KERNEL >> MYKERN cat /usr/share/examples/isdn/KERNEL ... example fragment of a kernel config file to include... Put this into your kernel config. It works fine with my AVM B1: device "i4bcapi" device iavc device isic pseudo-device "i4bq921" pseudo-device "i4bq931" pseudo-device "i4b" pseudo-device "i4btrc" 4 pseudo-device "i4bctl" pseudo-device "i4brbch" 4 pseudo-device "i4btel" 4 pseudo-device "i4bipr" 4 pseudo-device "i4bisppp" 4 Greetings, Johannes From owner-freebsd-isdn@FreeBSD.ORG Thu Mar 3 23:47:43 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 A4C2916A4CE for ; Thu, 3 Mar 2005 23:47:43 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id 39B8E43D4C for ; Thu, 3 Mar 2005 23:47:41 +0000 (GMT) (envelope-from jgale.work@gmail.com) Received: by rproxy.gmail.com with SMTP id a41so491078rng for ; Thu, 03 Mar 2005 15:47:40 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=EnVYTBywUSy/BGP/j7BO8Kne1eopHvIkhvcgeXK+lbwS/SobaS0uSIb28TxL0LE6zoqqhyOZITm/x4pZh3rGx8zxikOQZXRonzqECe+xVXrE9VonRS532yImzK7VUAAlhIbsHBzSWeaYsqfJjjuoGdx8WJvvG9cIxSj+1cYvm6g= Received: by 10.38.86.26 with SMTP id j26mr217140rnb; Thu, 03 Mar 2005 15:47:40 -0800 (PST) Received: by 10.38.71.63 with HTTP; Thu, 3 Mar 2005 15:47:40 -0800 (PST) Message-ID: <1a4ba29305030315476c92b656@mail.gmail.com> Date: Thu, 3 Mar 2005 16:47:40 -0700 From: Jeremy Gale To: freebsd-isdn@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Multiple Port Passive ISDN Card X-BeenThere: freebsd-isdn@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Jeremy Gale List-Id: Using ISDN with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Mar 2005 23:47:43 -0000 Hi everyone, I'm trying to evalutate the feasibility of using the i4b framework to write a driver for a multiple port (AKA multiple trunk, multiple span) passive ISDN card. E.g. a card with 8 BRI ports. I'm writing the driver for NetBSD so that's mostly what I've been looking at. If things are significantly different on FreeBSD please let me know. The one problem I've isolated is the l1_token member in the isdn_l3_driver struct. It looks to me that for all passive cards, it is used as a pointer to the l2_softc struct. For the CAPI active cards it points to a capi_softc_t structure. For the incomplete daic driver, the only multiple port card I am aware of, it is a pointer to the structure for the specific port being used. I believe I need to do something similar to the daic driver, but also need the l2_softc pointer. One of the crucial functions seems to be i4b_link_bchandrvr(call_desc_t *cd) for connecting a call to a B channel driver. The function first gets a port-specific l3drv driver 'd', and then calls cd->ilt = d->l3driver->get_linktab(d->l1_token, cd->channelid); I assume the channel ID cannot belong to a huge range (my card could have 130+ B channels) and is specific to the port. So the l1_token needs to be used to specify what port is being used. daic_ret_linktab uses this to calculate which daic_connection linktab to return like so: struct daic_unit *du = token; struct daic_softc *sc = du->du_sc; int port = du->du_port; struct daic_connection *con = &sc->sc_con[port*2+channel]; return(&con->isdn_linktab); I also need to do something like this - index into my large B channel array. Right now I'm thinking of using a hack. Each port will have an l2_softc structure and the member immediately after the structure will be the port number. Then I can use some trickery like: struct l2_softc *l2sc = token; int* port_ptr = (int *) (token + sizeof(l2_softc)); int port = *port_ptr; My pointer arithmetic may be a little off there but you get the idea. Does this seem like a good idea? Is there a cleaner way to do it? Am I likely to encounter other problems trying to develop a multiple port driver? How far along is the daic driver? Is it a proof of concept or farther than that? Thanks very much! Jeremy From owner-freebsd-isdn@FreeBSD.ORG Fri Mar 4 07:45:32 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 9108216A4CE for ; Fri, 4 Mar 2005 07:45:32 +0000 (GMT) Received: from mail.duskware.de (mail.duskware.de [213.146.108.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4B7E643D46 for ; Fri, 4 Mar 2005 07:45:31 +0000 (GMT) (envelope-from martin@duskware.de) Received: by mail.duskware.de (Postfix, from userid 205) id E54DA33A85; Fri, 4 Mar 2005 08:45:28 +0100 (CET) Date: Fri, 4 Mar 2005 08:45:28 +0100 From: Martin Husemann To: Jeremy Gale Message-ID: <20050304074528.GB29761@drowsy.duskware.de> References: <1a4ba29305030315476c92b656@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1a4ba29305030315476c92b656@mail.gmail.com> User-Agent: Mutt/1.4.2.1i cc: freebsd-isdn@freebsd.org Subject: Re: Multiple Port Passive ISDN Card X-BeenThere: freebsd-isdn@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Using ISDN with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Mar 2005 07:45:32 -0000 On Thu, Mar 03, 2005 at 04:47:40PM -0700, Jeremy Gale wrote: > If > things are significantly different on FreeBSD please let me know. They are, at exactly the level your questions are about. > The one problem I've isolated is the l1_token member in the > isdn_l3_driver struct. It is an opaque pointer passed around and back to you. Make the thing it points to contain everything you need. > It looks to me that for all passive cards, it > is used as a pointer to the l2_softc struct. Yes. Active cards don't need the l2/l3 software part, and passive cards don't need anything above layer 1 for themselfs, realy (besides some special notifications like "turn on link LED", which they get from layer 4). So if you do multiple BRIs, I would just attache multiple l2 instances with a l2_softc each. Easy. > For the incomplete daic driver, > the only multiple port card I am aware of, it is a pointer to the > structure for the specific port being used. The daic quad card is bit different. It does handle four l2/l3 stacks in firmware and you have to access all of them via a common shared memory area. As an active card it does not need a l2_softc, so instead of multiple l2_softcs it uses a minimal structure that identifies the internal "port number" and the shared daic_softc. In your case just fill the l2_softc with a common driver pointer and a different l1_token, where your "driver" functions have a way to find out the global softc for your card and the port specific data (whatever that is). Something like: struct my_port { struct my_softc *sc; bus_space_tag_t iot; bus_space_handle_t ioh; int port_number; /* if you realy need this, probably you don't */ }; struct my_softc { struct device sc_dev; ... struct my_port ports[NPORTS]; ... }; and then fill in ports[i].sc plus ioh/iot (maybe with bus_space_subregion etc) and use &sc->ports[i] as l1token when creating the l2_softc for port i. Martin P.S.: the daic driver is one I started a long time ago just because I have such a card - then ran out of time and never came back to it. It was usefull to make sure the internal interface work for active cards, and maybe someday I'll realy finish it ;-)