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
This commit is contained in:
parent
7c92769c19
commit
5d0c7501b6
6
UPDATING
6
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
|
developers choose to disable these features on build machines
|
||||||
to maximize performance.
|
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:
|
20060627:
|
||||||
The XBOX kernel now defaults to the nfe(4) driver instead of
|
The XBOX kernel now defaults to the nfe(4) driver instead of
|
||||||
the nve(4) driver. Please update your configuration
|
the nve(4) driver. Please update your configuration
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
*---------------------------------------------------------------------------*/
|
*---------------------------------------------------------------------------*/
|
||||||
#define VERSION 1 /* version number */
|
#define VERSION 1 /* version number */
|
||||||
#define REL 4 /* release number */
|
#define REL 4 /* release number */
|
||||||
#define STEP 0 /* release step */
|
#define STEP 1 /* release step */
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*
|
/*---------------------------------------------------------------------------*
|
||||||
* date/time format in i4b log messages
|
* date/time format in i4b log messages
|
||||||
@ -78,7 +78,8 @@
|
|||||||
#define CTRL_TINADD 3 /* Stollmann Tina-dd active card*/
|
#define CTRL_TINADD 3 /* Stollmann Tina-dd active card*/
|
||||||
#define CTRL_AVMB1 4 /* AVM B1 active card */
|
#define CTRL_AVMB1 4 /* AVM B1 active card */
|
||||||
#define CTRL_CAPI 5 /* cards seen via the CAPI layer*/
|
#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
|
* CTRL_PASSIVE: driver types
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
*---------------------------------------------------------------------------*/
|
*---------------------------------------------------------------------------*/
|
||||||
#define VERSION 1 /* version number */
|
#define VERSION 1 /* version number */
|
||||||
#define REL 4 /* release number */
|
#define REL 4 /* release number */
|
||||||
#define STEP 0 /* release step */
|
#define STEP 1 /* release step */
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*
|
/*---------------------------------------------------------------------------*
|
||||||
* date/time format in i4b log messages
|
* date/time format in i4b log messages
|
||||||
@ -78,7 +78,8 @@
|
|||||||
#define CTRL_TINADD 3 /* Stollmann Tina-dd active card*/
|
#define CTRL_TINADD 3 /* Stollmann Tina-dd active card*/
|
||||||
#define CTRL_AVMB1 4 /* AVM B1 active card */
|
#define CTRL_AVMB1 4 /* AVM B1 active card */
|
||||||
#define CTRL_CAPI 5 /* cards seen via the CAPI layer*/
|
#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
|
* CTRL_PASSIVE: driver types
|
||||||
|
@ -301,7 +301,9 @@ i4b_l4_daemon_attached(void)
|
|||||||
|
|
||||||
for(i=0; i < nctrl; i++)
|
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);
|
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);
|
(*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++)
|
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);
|
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);
|
(*ctrl_desc[i].N_MGMT_COMMAND)(ctrl_desc[i].unit, CMR_DCLOSE, 0);
|
||||||
|
@ -95,6 +95,10 @@ name_of_controller(int ctrl_type, int card_type)
|
|||||||
"AVM B1 ISA",
|
"AVM B1 ISA",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static char *capimgr_card[] = {
|
||||||
|
"CAPI manager driven board"
|
||||||
|
};
|
||||||
|
|
||||||
if(ctrl_type == CTRL_PASSIVE)
|
if(ctrl_type == CTRL_PASSIVE)
|
||||||
{
|
{
|
||||||
int index = card_type - CARD_TYPEP_8;
|
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] ))
|
if (index >= 0 && index < (sizeof capi_card / sizeof capi_card[0] ))
|
||||||
return capi_card[index];
|
return capi_card[index];
|
||||||
}
|
}
|
||||||
|
else if(ctrl_type == CTRL_CAPIMGR)
|
||||||
|
{
|
||||||
|
return capimgr_card[0];
|
||||||
|
}
|
||||||
|
|
||||||
return "unknown card type";
|
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;
|
isdn_ctrl_tab[controller].state = CTRL_UP;
|
||||||
break;
|
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:
|
default:
|
||||||
llog(LL_ERR, "init_controller_state: unknown controller type %d", ctrl_type);
|
llog(LL_ERR, "init_controller_state: unknown controller type %d", ctrl_type);
|
||||||
return(ERROR);
|
return(ERROR);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user