Release 4.11 drivers/isdn/hardware/eicon/diddfunc.c
/* $Id: diddfunc.c,v 1.14.6.2 2004/08/28 20:03:53 armin Exp $
*
* DIDD Interface module for Eicon active cards.
*
* Functions are in dadapter.c
*
* Copyright 2002-2003 by Armin Schindler (mac@melware.de)
* Copyright 2002-2003 Cytronics & Melware (info@melware.de)
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
*/
#include "platform.h"
#include "di_defs.h"
#include "dadapter.h"
#include "divasync.h"
#define DBG_MINIMUM (DL_LOG + DL_FTL + DL_ERR)
#define DBG_DEFAULT (DBG_MINIMUM + DL_XLOG + DL_REG)
extern void DIVA_DIDD_Read(void *, int);
extern char *DRIVERRELEASE_DIDD;
static dword notify_handle;
static DESCRIPTOR _DAdapter;
/*
* didd callback function
*/
static void *didd_callback(void *context, DESCRIPTOR *adapter,
int removal)
{
if (adapter->type == IDI_DADAPTER) {
DBG_ERR(("Notification about IDI_DADAPTER change ! Oops."))
return (NULL);
} else if (adapter->type == IDI_DIMAINT) {
if (removal) {
DbgDeregister();
} else {
DbgRegister("DIDD", DRIVERRELEASE_DIDD, DBG_DEFAULT);
}
}
return (NULL);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Armin Schindler | 76 | 100.00% | 2 | 100.00% |
Total | 76 | 100.00% | 2 | 100.00% |
/*
* connect to didd
*/
static int __init connect_didd(void)
{
int x = 0;
int dadapter = 0;
IDI_SYNC_REQ req;
DESCRIPTOR DIDD_Table[MAX_DESCRIPTORS];
DIVA_DIDD_Read(DIDD_Table, sizeof(DIDD_Table));
for (x = 0; x < MAX_DESCRIPTORS; x++) {
if (DIDD_Table[x].type == IDI_DADAPTER) { /* DADAPTER found */
dadapter = 1;
memcpy(&_DAdapter, &DIDD_Table[x], sizeof(_DAdapter));
req.didd_notify.e.Req = 0;
req.didd_notify.e.Rc =
IDI_SYNC_REQ_DIDD_REGISTER_ADAPTER_NOTIFY;
req.didd_notify.info.callback = (void *)didd_callback;
req.didd_notify.info.context = NULL;
_DAdapter.request((ENTITY *)&req);
if (req.didd_notify.e.Rc != 0xff)
return (0);
notify_handle = req.didd_notify.info.handle;
} else if (DIDD_Table[x].type == IDI_DIMAINT) { /* MAINT found */
DbgRegister("DIDD", DRIVERRELEASE_DIDD, DBG_DEFAULT);
}
}
return (dadapter);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Armin Schindler | 198 | 99.00% | 2 | 50.00% |
Al Viro | 1 | 0.50% | 1 | 25.00% |
H Hartley Sweeten | 1 | 0.50% | 1 | 25.00% |
Total | 200 | 100.00% | 4 | 100.00% |
/*
* disconnect from didd
*/
static void __exit disconnect_didd(void)
{
IDI_SYNC_REQ req;
req.didd_notify.e.Req = 0;
req.didd_notify.e.Rc = IDI_SYNC_REQ_DIDD_REMOVE_ADAPTER_NOTIFY;
req.didd_notify.info.handle = notify_handle;
_DAdapter.request((ENTITY *)&req);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Armin Schindler | 53 | 98.15% | 1 | 50.00% |
H Hartley Sweeten | 1 | 1.85% | 1 | 50.00% |
Total | 54 | 100.00% | 2 | 100.00% |
/*
* init
*/
int __init diddfunc_init(void)
{
diva_didd_load_time_init();
if (!connect_didd()) {
DBG_ERR(("init: failed to connect to DIDD."))
diva_didd_load_time_finit();
return (0);
}
return (1);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Armin Schindler | 37 | 97.37% | 1 | 50.00% |
H Hartley Sweeten | 1 | 2.63% | 1 | 50.00% |
Total | 38 | 100.00% | 2 | 100.00% |
/*
* finit
*/
void __exit diddfunc_finit(void)
{
DbgDeregister();
disconnect_didd();
diva_didd_load_time_finit();
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Armin Schindler | 16 | 94.12% | 1 | 50.00% |
H Hartley Sweeten | 1 | 5.88% | 1 | 50.00% |
Total | 17 | 100.00% | 2 | 100.00% |
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Armin Schindler | 428 | 98.62% | 2 | 40.00% |
H Hartley Sweeten | 4 | 0.92% | 1 | 20.00% |
Al Viro | 1 | 0.23% | 1 | 20.00% |
Joe Perches | 1 | 0.23% | 1 | 20.00% |
Kai Germaschewski | | 0.00% | 0 | 0.00% |
Total | 434 | 100.00% | 5 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.