summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortwinterg <twinterg@FreeBSD.org>2006-07-09 21:16:06 +0000
committertwinterg <twinterg@FreeBSD.org>2006-07-09 21:16:06 +0000
commit3e2c62d3198b032c952fbda0c36b0eb1cbe1b74d (patch)
treef1e2ba5979c1f2497f0adf05c561ac6c95668e30
parent8edb3edf3ac746ae6d840c4416bef97a7cf74a71 (diff)
downloadFreeBSD-src-3e2c62d3198b032c952fbda0c36b0eb1cbe1b74d.zip
FreeBSD-src-3e2c62d3198b032c952fbda0c36b0eb1cbe1b74d.tar.gz
Extend i4b to support CAPI manager based ISDN controllers (CAPI manager is part of
c4b, CAPI for BSD). This is a preparation to add CAPI for BSD to the source tree. Approved by: hm (mentor) MFC after: 2 weeks
-rw-r--r--UPDATING6
-rw-r--r--sys/i386/include/i4b_ioctl.h5
-rw-r--r--sys/i4b/include/i4b_ioctl.h5
-rw-r--r--sys/i4b/layer4/i4b_l4mgmt.c8
-rw-r--r--usr.sbin/i4b/isdnd/controller.c14
5 files changed, 32 insertions, 6 deletions
diff --git a/UPDATING b/UPDATING
index 1eacca8..5e87312 100644
--- a/UPDATING
+++ b/UPDATING
@@ -21,6 +21,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 7.x IS SLOW:
developers choose to disable these features on build machines
to maximize performance.
+20060709:
+ The interface version of the i4b kernel part has changed. So
+ after updating the kernel sources and compiling a new kernel,
+ the i4b user space tools in "/usr/src/usr.sbin/i4b" must also
+ be rebuilt, and vice versa.
+
20060627:
The XBOX kernel now defaults to the nfe(4) driver instead of
the nve(4) driver. Please update your configuration
diff --git a/sys/i386/include/i4b_ioctl.h b/sys/i386/include/i4b_ioctl.h
index bcf131a..5c8e4fe 100644
--- a/sys/i386/include/i4b_ioctl.h
+++ b/sys/i386/include/i4b_ioctl.h
@@ -42,7 +42,7 @@
*---------------------------------------------------------------------------*/
#define VERSION 1 /* version number */
#define REL 4 /* release number */
-#define STEP 0 /* release step */
+#define STEP 1 /* release step */
/*---------------------------------------------------------------------------*
* date/time format in i4b log messages
@@ -78,7 +78,8 @@
#define CTRL_TINADD 3 /* Stollmann Tina-dd active card*/
#define CTRL_AVMB1 4 /* AVM B1 active card */
#define CTRL_CAPI 5 /* cards seen via the CAPI layer*/
-#define CTRL_NUMTYPES 6 /* number of controller types */
+#define CTRL_CAPIMGR 6 /* boards accessed through the CAPI manager */
+#define CTRL_NUMTYPES 7 /* number of controller types */
/*---------------------------------------------------------------------------*
* CTRL_PASSIVE: driver types
diff --git a/sys/i4b/include/i4b_ioctl.h b/sys/i4b/include/i4b_ioctl.h
index bcf131a..5c8e4fe 100644
--- a/sys/i4b/include/i4b_ioctl.h
+++ b/sys/i4b/include/i4b_ioctl.h
@@ -42,7 +42,7 @@
*---------------------------------------------------------------------------*/
#define VERSION 1 /* version number */
#define REL 4 /* release number */
-#define STEP 0 /* release step */
+#define STEP 1 /* release step */
/*---------------------------------------------------------------------------*
* date/time format in i4b log messages
@@ -78,7 +78,8 @@
#define CTRL_TINADD 3 /* Stollmann Tina-dd active card*/
#define CTRL_AVMB1 4 /* AVM B1 active card */
#define CTRL_CAPI 5 /* cards seen via the CAPI layer*/
-#define CTRL_NUMTYPES 6 /* number of controller types */
+#define CTRL_CAPIMGR 6 /* boards accessed through the CAPI manager */
+#define CTRL_NUMTYPES 7 /* number of controller types */
/*---------------------------------------------------------------------------*
* CTRL_PASSIVE: driver types
diff --git a/sys/i4b/layer4/i4b_l4mgmt.c b/sys/i4b/layer4/i4b_l4mgmt.c
index a5cf26b..031a606 100644
--- a/sys/i4b/layer4/i4b_l4mgmt.c
+++ b/sys/i4b/layer4/i4b_l4mgmt.c
@@ -301,7 +301,9 @@ i4b_l4_daemon_attached(void)
for(i=0; i < nctrl; i++)
{
-/*XXX*/ if(ctrl_desc[i].ctrl_type == CTRL_PASSIVE)
+/*XXX*/ if(*ctrl_desc[i].N_MGMT_COMMAND &&
+ (ctrl_desc[i].ctrl_type == CTRL_PASSIVE ||
+ ctrl_desc[i].ctrl_type == CTRL_CAPIMGR))
{
NDBGL4(L4_MSG, "CMR_DOPEN sent to unit %d", ctrl_desc[i].unit);
(*ctrl_desc[i].N_MGMT_COMMAND)(ctrl_desc[i].unit, CMR_DOPEN, 0);
@@ -322,7 +324,9 @@ i4b_l4_daemon_detached(void)
for(i=0; i < nctrl; i++)
{
-/*XXX*/ if(ctrl_desc[i].ctrl_type == CTRL_PASSIVE)
+/*XXX*/ if(*ctrl_desc[i].N_MGMT_COMMAND &&
+ (ctrl_desc[i].ctrl_type == CTRL_PASSIVE ||
+ ctrl_desc[i].ctrl_type == CTRL_CAPIMGR))
{
NDBGL4(L4_MSG, "CMR_DCLOSE sent to unit %d", ctrl_desc[i].unit);
(*ctrl_desc[i].N_MGMT_COMMAND)(ctrl_desc[i].unit, CMR_DCLOSE, 0);
diff --git a/usr.sbin/i4b/isdnd/controller.c b/usr.sbin/i4b/isdnd/controller.c
index f9290bf..bdaa3c4 100644
--- a/usr.sbin/i4b/isdnd/controller.c
+++ b/usr.sbin/i4b/isdnd/controller.c
@@ -95,6 +95,10 @@ name_of_controller(int ctrl_type, int card_type)
"AVM B1 ISA",
};
+ static char *capimgr_card[] = {
+ "CAPI manager driven board"
+ };
+
if(ctrl_type == CTRL_PASSIVE)
{
int index = card_type - CARD_TYPEP_8;
@@ -117,6 +121,10 @@ name_of_controller(int ctrl_type, int card_type)
if (index >= 0 && index < (sizeof capi_card / sizeof capi_card[0] ))
return capi_card[index];
}
+ else if(ctrl_type == CTRL_CAPIMGR)
+ {
+ return capimgr_card[0];
+ }
return "unknown card type";
}
@@ -215,6 +223,12 @@ init_controller_state(int controller, int ctrl_type, int card_type, int tei,
isdn_ctrl_tab[controller].state = CTRL_UP;
break;
+ case CTRL_CAPIMGR:
+ isdn_ctrl_tab[controller].ctrl_type = ctrl_type;
+ isdn_ctrl_tab[controller].card_type = card_type;
+ isdn_ctrl_tab[controller].state = CTRL_UP;
+ break;
+
default:
llog(LL_ERR, "init_controller_state: unknown controller type %d", ctrl_type);
return(ERROR);
OpenPOWER on IntegriCloud