Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Ready the kernel side of i4b for primary rate interface ...



details:   https://anonhg.NetBSD.org/src/rev/6b9c602407fc
branches:  trunk
changeset: 552809:6b9c602407fc
user:      pooka <pooka%NetBSD.org@localhost>
date:      Fri Oct 03 16:38:44 2003 +0000

description:
Ready the kernel side of i4b for primary rate interface support by
removing assumptions that there are only two B channels and by
adding support for a varying number of channels.

Due to this, rename previously used isdn identified "bri" to "isdnif",
which better describes the current situation.

diffstat:

 sys/dev/ic/isic.c            |   13 ++--
 sys/dev/ic/isic_l1.c         |    6 +-
 sys/dev/ic/isic_l1.h         |    4 +-
 sys/dev/isa/isic_isa.c       |    4 +-
 sys/dev/isapnp/isic_isapnp.c |    4 +-
 sys/dev/pci/iavc_pci.c       |    8 +-
 sys/dev/pci/ifpci.c          |   14 ++--
 sys/dev/pci/ifpci2.c         |   16 +++---
 sys/dev/pci/isic_pci.c       |    6 +-
 sys/dev/pci/iwic_pci.c       |   11 ++--
 sys/dev/pcmcia/isic_pcmcia.c |    4 +-
 sys/netisdn/i4b_capi.h       |    4 +-
 sys/netisdn/i4b_capi_l4if.c  |   11 ++--
 sys/netisdn/i4b_capi_msgs.c  |   22 ++++----
 sys/netisdn/i4b_ctl.c        |   12 ++--
 sys/netisdn/i4b_i4bdrv.c     |   79 ++++++++++++++++++--------------
 sys/netisdn/i4b_ioctl.h      |    4 +-
 sys/netisdn/i4b_l1l2.h       |    4 +-
 sys/netisdn/i4b_l2.c         |   24 +++++-----
 sys/netisdn/i4b_l2.h         |    8 +-
 sys/netisdn/i4b_l2if.c       |   57 +++++++++++++-----------
 sys/netisdn/i4b_l2timer.c    |   26 +++++-----
 sys/netisdn/i4b_l3.h         |    4 +-
 sys/netisdn/i4b_l3l4.h       |   42 ++++++++++-------
 sys/netisdn/i4b_l4.c         |  101 ++++++++++++++++++++++--------------------
 sys/netisdn/i4b_l4.h         |    6 +-
 sys/netisdn/i4b_l4if.c       |   52 +++++++++++----------
 sys/netisdn/i4b_l4mgmt.c     |   36 +++++++-------
 sys/netisdn/i4b_lme.c        |    9 ++-
 sys/netisdn/i4b_q931.c       |   17 +++---
 sys/netisdn/i4b_rbch.c       |   16 +++---
 sys/netisdn/i4b_sframe.c     |   14 ++--
 sys/netisdn/i4b_tei.c        |   14 ++--
 sys/netisdn/i4b_trace.c      |   60 ++++++++++++------------
 sys/netisdn/i4b_trace.h      |    4 +-
 sys/netisdn/i4b_util.c       |    8 +-
 36 files changed, 378 insertions(+), 346 deletions(-)

diffs (truncated from 2467 to 300 lines):

diff -r bc9d2a1fe6ec -r 6b9c602407fc sys/dev/ic/isic.c
--- a/sys/dev/ic/isic.c Fri Oct 03 16:34:31 2003 +0000
+++ b/sys/dev/ic/isic.c Fri Oct 03 16:38:44 2003 +0000
@@ -27,14 +27,14 @@
  *     i4b_isic.c - global isic stuff
  *     ==============================
  *
- *     $Id: isic.c,v 1.19 2003/01/06 13:05:10 wiz Exp $ 
+ *     $Id: isic.c,v 1.20 2003/10/03 16:38:44 pooka Exp $ 
  *
  *      last edit-date: [Fri Jan  5 11:36:10 2001]
  *
  *---------------------------------------------------------------------------*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isic.c,v 1.19 2003/01/06 13:05:10 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isic.c,v 1.20 2003/10/03 16:38:44 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/ioccom.h>
@@ -227,17 +227,18 @@
 }
 
 int
-isic_attach_bri(struct isic_softc *sc, const char *cardname, const struct isdn_layer1_bri_driver *dchan_driver)
+isic_attach_bri(struct isic_softc *sc, const char *cardname, const struct isdn_layer1_isdnif_driver *dchan_driver)
 {
        struct isdn_l3_driver * drv;
 
-       drv = isdn_attach_bri(sc->sc_dev.dv_xname, cardname, &sc->sc_l2, &isic_l3_driver);
+       drv = isdn_attach_isdnif(sc->sc_dev.dv_xname, cardname,
+           &sc->sc_l2, &isic_l3_driver, NBCH_BRI);
        sc->sc_l3token = drv;
        sc->sc_l2.driver = dchan_driver;
        sc->sc_l2.l1_token = sc;
        sc->sc_l2.drv = drv;
        isdn_layer2_status_ind(&sc->sc_l2, drv, STI_ATTACH, 1);
-       isdn_bri_ready(drv->bri);
+       isdn_isdnif_ready(drv->isdnif);
        return 1;
 }
 
@@ -245,7 +246,7 @@
 isic_detach_bri(struct isic_softc *sc)
 {
        isdn_layer2_status_ind(&sc->sc_l2, sc->sc_l3token, STI_ATTACH, 0);
-       isdn_detach_bri(sc->sc_l3token);
+       isdn_detach_isdnif(sc->sc_l3token);
        sc->sc_l3token = NULL;
        return 1;
 }
diff -r bc9d2a1fe6ec -r 6b9c602407fc sys/dev/ic/isic_l1.c
--- a/sys/dev/ic/isic_l1.c      Fri Oct 03 16:34:31 2003 +0000
+++ b/sys/dev/ic/isic_l1.c      Fri Oct 03 16:38:44 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isic_l1.c,v 1.13 2002/10/25 21:03:48 leo Exp $ */
+/* $NetBSD: isic_l1.c,v 1.14 2003/10/03 16:38:44 pooka Exp $ */
 
 /*
  * Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isic_l1.c,v 1.13 2002/10/25 21:03:48 leo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isic_l1.c,v 1.14 2003/10/03 16:38:44 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/ioctl.h>
@@ -67,7 +67,7 @@
 static int isic_std_mph_command_req(isdn_layer1token, int, void*);
 static void isic_enable_intr(struct isic_softc *sc, int enable);
 
-const struct isdn_layer1_bri_driver isic_std_driver = {
+const struct isdn_layer1_isdnif_driver isic_std_driver = {
        isic_std_ph_data_req,
        isic_std_ph_activate_req,
        isic_std_mph_command_req
diff -r bc9d2a1fe6ec -r 6b9c602407fc sys/dev/ic/isic_l1.h
--- a/sys/dev/ic/isic_l1.h      Fri Oct 03 16:34:31 2003 +0000
+++ b/sys/dev/ic/isic_l1.h      Fri Oct 03 16:38:44 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isic_l1.h,v 1.15 2003/07/11 10:15:56 drochner Exp $ */
+/* $NetBSD: isic_l1.h,v 1.16 2003/10/03 16:38:44 pooka Exp $ */
 
 /*
  * Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved.
@@ -359,7 +359,7 @@
 extern int isic_probe_s08 __P((struct isic_attach_args *ia));
 extern int isic_probe_usrtai __P((struct isic_attach_args *ia));
 extern int isic_probe_itkix1 __P((struct isic_attach_args *ia));
-extern int isic_attach_bri(struct isic_softc *sc, const char *cardname, const struct isdn_layer1_bri_driver *dchan_driver);
+extern int isic_attach_bri(struct isic_softc *sc, const char *cardname, const struct isdn_layer1_isdnif_driver *dchan_driver);
 extern int isic_detach_bri(struct isic_softc *sc);
 
 extern void isic_isacsx_disable_intr __P((struct isic_softc *sc));
diff -r bc9d2a1fe6ec -r 6b9c602407fc sys/dev/isa/isic_isa.c
--- a/sys/dev/isa/isic_isa.c    Fri Oct 03 16:34:31 2003 +0000
+++ b/sys/dev/isa/isic_isa.c    Fri Oct 03 16:38:44 2003 +0000
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isic_isa.c,v 1.17 2002/10/20 10:50:01 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isic_isa.c,v 1.18 2003/10/03 16:38:44 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/errno.h>
@@ -78,7 +78,7 @@
 #include <netisdn/i4b_mbuf.h>
 #include <netisdn/i4b_global.h>
 
-extern const struct isdn_layer1_bri_driver isic_std_driver;
+extern const struct isdn_layer1_isdnif_driver isic_std_driver;
 
 #if defined(__OpenBSD__)
 #define __BROKEN_INDIRECT_CONFIG
diff -r bc9d2a1fe6ec -r 6b9c602407fc sys/dev/isapnp/isic_isapnp.c
--- a/sys/dev/isapnp/isic_isapnp.c      Fri Oct 03 16:34:31 2003 +0000
+++ b/sys/dev/isapnp/isic_isapnp.c      Fri Oct 03 16:38:44 2003 +0000
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isic_isapnp.c,v 1.15 2002/10/02 16:34:03 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isic_isapnp.c,v 1.16 2003/10/03 16:38:44 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/errno.h>
@@ -80,7 +80,7 @@
 
 #include "opt_isicpnp.h"
 
-extern const struct isdn_layer1_bri_driver isic_std_driver;
+extern const struct isdn_layer1_isdnif_driver isic_std_driver;
 
 #ifdef __BROKEN_INDIRECT_CONFIG
 static int isic_isapnp_probe __P((struct device *, void *, void *));
diff -r bc9d2a1fe6ec -r 6b9c602407fc sys/dev/pci/iavc_pci.c
--- a/sys/dev/pci/iavc_pci.c    Fri Oct 03 16:34:31 2003 +0000
+++ b/sys/dev/pci/iavc_pci.c    Fri Oct 03 16:38:44 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: iavc_pci.c,v 1.1 2003/09/25 15:53:26 pooka Exp $       */
+/*     $NetBSD: iavc_pci.c,v 1.2 2003/10/03 16:38:44 pooka Exp $       */
 
 /*
  * Copyright (c) 2001-2003 Cubical Solutions Ltd.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: iavc_pci.c,v 1.1 2003/09/25 15:53:26 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: iavc_pci.c,v 1.2 2003/10/03 16:38:44 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -160,7 +160,7 @@
 
 #if 0
                sc->sc_capi.card_type = CARD_TYPEC_AVM_T1_PCI;
-               sc->sc_capi.sc_nbch = 30;
+               sc->sc_capi.sc_nbch = NBCH_PRI;
                ret = iavc_t1_detect(sc);
                if (ret) {
                        if (ret < 6) {
@@ -179,7 +179,7 @@
 
        } else if (pp->npp_product == PCI_PRODUCT_AVM_B1) {
                sc->sc_capi.card_type = CARD_TYPEC_AVM_B1_PCI;
-               sc->sc_capi.sc_nbch = 2;
+               sc->sc_capi.sc_nbch = NBCH_BRI;
                ret = iavc_b1dma_detect(sc);
                if (ret) {
                        ret = iavc_b1_detect(sc);
diff -r bc9d2a1fe6ec -r 6b9c602407fc sys/dev/pci/ifpci.c
--- a/sys/dev/pci/ifpci.c       Fri Oct 03 16:34:31 2003 +0000
+++ b/sys/dev/pci/ifpci.c       Fri Oct 03 16:38:44 2003 +0000
@@ -35,14 +35,14 @@
  *     Fritz!Card PCI driver
  *     ------------------------------------------------
  *
- *     $Id: ifpci.c,v 1.13 2002/10/02 16:51:38 thorpej Exp $
+ *     $Id: ifpci.c,v 1.14 2003/10/03 16:38:44 pooka Exp $
  *
  *      last edit-date: [Fri Jan  5 11:38:58 2001]
  *
  *---------------------------------------------------------------------------*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ifpci.c,v 1.13 2002/10/02 16:51:38 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ifpci.c,v 1.14 2003/10/03 16:38:44 pooka Exp $");
 
 
 #include <sys/param.h>
@@ -90,7 +90,7 @@
 void n_alert_request(struct call_desc *cd);
 void n_mgmt_command(struct isdn_l3_driver *drv, int cmd, void *parm);
 
-extern const struct isdn_layer1_bri_driver isic_std_driver;
+extern const struct isdn_layer1_isdnif_driver isic_std_driver;
 
 const struct isdn_l3_driver_functions
 ifpci_l3_driver = {
@@ -385,14 +385,14 @@
        sc->sc_freeflag2 = 0;
 
        /* init higher protocol layers */
-       drv = isdn_attach_bri(sc->sc_dev.dv_xname,
-           "AVM Fritz!PCI", &sc->sc_l2, &ifpci_l3_driver);
+       drv = isdn_attach_isdnif(sc->sc_dev.dv_xname,
+           "AVM Fritz!PCI", &sc->sc_l2, &ifpci_l3_driver, NBCH_BRI);
        sc->sc_l3token = drv;
        sc->sc_l2.driver = &isic_std_driver;
        sc->sc_l2.l1_token = sc;
        sc->sc_l2.drv = drv;
        isdn_layer2_status_ind(&sc->sc_l2, drv, STI_ATTACH, 1);
-       isdn_bri_ready(drv->bri);
+       isdn_isdnif_ready(drv->isdnif);
 }
 
 static int
@@ -426,7 +426,7 @@
        case DVACT_DEACTIVATE:
                psc->sc_isic.sc_intr_valid = ISIC_INTR_DYING;
                isdn_layer2_status_ind(&psc->sc_isic.sc_l2, psc->sc_isic.sc_l3token, STI_ATTACH, 0);
-               isdn_detach_bri(psc->sc_isic.sc_l3token);
+               isdn_detach_isdnif(psc->sc_isic.sc_l3token);
                psc->sc_isic.sc_l3token = NULL;
                break;
        }
diff -r bc9d2a1fe6ec -r 6b9c602407fc sys/dev/pci/ifpci2.c
--- a/sys/dev/pci/ifpci2.c      Fri Oct 03 16:34:31 2003 +0000
+++ b/sys/dev/pci/ifpci2.c      Fri Oct 03 16:38:44 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ifpci2.c,v 1.1 2002/10/25 21:03:49 leo Exp $       */
+/* $NetBSD: ifpci2.c,v 1.2 2003/10/03 16:38:44 pooka Exp $     */
 /*
  *   Copyright (c) 1999 Gary Jennejohn. All rights reserved.
  *
@@ -36,14 +36,14 @@
  *     Fritz!Card PCI driver
  *     ------------------------------------------------
  *
- *     $Id: ifpci2.c,v 1.1 2002/10/25 21:03:49 leo Exp $
+ *     $Id: ifpci2.c,v 1.2 2003/10/03 16:38:44 pooka Exp $
  *
  *      last edit-date: [Fri Jan  5 11:38:58 2001]
  *
  *---------------------------------------------------------------------------*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ifpci2.c,v 1.1 2002/10/25 21:03:49 leo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ifpci2.c,v 1.2 2003/10/03 16:38:44 pooka Exp $");
 
 
 #include <sys/param.h>
@@ -91,7 +91,7 @@
 void n_alert_request(struct call_desc *cd);
 void n_mgmt_command(struct isdn_l3_driver *drv, int cmd, void *parm);
 
-extern const struct isdn_layer1_bri_driver isic_std_driver;
+extern const struct isdn_layer1_isdnif_driver isic_std_driver;
 
 const struct isdn_l3_driver_functions
 ifpci2_l3_driver = {
@@ -344,14 +344,14 @@
        sc->sc_freeflag2 = 0;
 
        /* init higher protocol layers */
-       drv = isdn_attach_bri(sc->sc_dev.dv_xname,
-           "AVM Fritz!PCI V2", &sc->sc_l2, &ifpci2_l3_driver);
+       drv = isdn_attach_isdnif(sc->sc_dev.dv_xname,
+           "AVM Fritz!PCI V2", &sc->sc_l2, &ifpci2_l3_driver, NBCH_BRI);
        sc->sc_l3token = drv;
        sc->sc_l2.driver = &isic_std_driver;
        sc->sc_l2.l1_token = sc;
        sc->sc_l2.drv = drv;
        isdn_layer2_status_ind(&sc->sc_l2, drv, STI_ATTACH, 1);
-       isdn_bri_ready(drv->bri);
+       isdn_isdnif_ready(drv->isdnif);
 }
 
 static int
@@ -385,7 +385,7 @@
        case DVACT_DEACTIVATE:
                psc->sc_isic.sc_intr_valid = ISIC_INTR_DYING;
                isdn_layer2_status_ind(&psc->sc_isic.sc_l2, psc->sc_isic.sc_l3token, STI_ATTACH, 0);
-               isdn_detach_bri(psc->sc_isic.sc_l3token);
+               isdn_detach_isdnif(psc->sc_isic.sc_l3token);
                psc->sc_isic.sc_l3token = NULL;
                break;
        }
diff -r bc9d2a1fe6ec -r 6b9c602407fc sys/dev/pci/isic_pci.c
--- a/sys/dev/pci/isic_pci.c    Fri Oct 03 16:34:31 2003 +0000
+++ b/sys/dev/pci/isic_pci.c    Fri Oct 03 16:38:44 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isic_pci.c,v 1.18 2002/10/02 16:51:40 thorpej Exp $ */
+/* $NetBSD: isic_pci.c,v 1.19 2003/10/03 16:38:44 pooka Exp $ */
 
 /*-



Home | Main Index | Thread Index | Old Index