Commit 57e06b22 authored by Linus Torvalds's avatar Linus Torvalds

Merge http://linux-isdn.bkbits.net/linux-2.5.eicon

into home.transmeta.com:/home/torvalds/v2.5/linux
parents 3b1022c5 e7f1f925
......@@ -5,6 +5,7 @@
if [ "$CONFIG_ISDN_CAPI" != "n" ]; then
comment 'CAPI hardware drivers'
source drivers/isdn/hardware/avm/Config.in
source drivers/isdn/hardware/eicon/Config.in
fi
if [ "$CONFIG_ISDN" != "n" ]; then
......
......@@ -3,6 +3,7 @@
# Object files in subdirectories
obj-$(CONFIG_CAPI_AVM) += avm/
obj-$(CONFIG_CAPI_EICON) += eicon/
# The global Rules.make.
......
CONFIG_CAPI_EICON
Enable support for Eicon Networks active ISDN cards.
CONFIG_ISDN_DIVAS
Say Y here if you have an Eicon Networks DIVA Server PCI ISDN card.
In order to use this card, additional firmware is necessary, which
has to be downloaded into the card using the divactrl utility.
CONFIG_ISDN_DIVAS_BRIPCI
Enable support for DIVA Server BRI-PCI.
CONFIG_ISDN_DIVAS_4BRIPCI
Enable support for DIVA Server 4BRI-PCI.
CONFIG_ISDN_DIVAS_PRIPCI
Enable support for DIVA Server PRI-PCI.
CONFIG_ISDN_DIVAS_MAINT
Enable Divas Maintainance driver.
CONFIG_ISDN_DIVAS_USERIDI
Enable support for user-mode IDI interface.
CONFIG_ISDN_DIVAS_DIVACAPI
You need this to provide the CAPI interface
for DIVA Server cards.
CONFIG_ISDN_DIVAS_DIVA2I4L
If you want to use the old isdn4linux module, you need
this enabled.
#
# ISDN DIVAS Eicon driver
#
mainmenu_option next_comment
comment 'Active Eicon DIVA Server cards'
bool 'Support Eicon cards' CONFIG_CAPI_EICON
if [ "$CONFIG_CAPI_EICON" != "n" ]; then
dep_tristate 'Support Eicon DIVA Server cards' CONFIG_ISDN_DIVAS $CONFIG_PROC_FS $CONFIG_PCI m
dep_mbool ' DIVA Server BRI/PCI support' CONFIG_ISDN_DIVAS_BRIPCI $CONFIG_ISDN_DIVAS
dep_mbool ' DIVA Server 4BRI/PCI support' CONFIG_ISDN_DIVAS_4BRIPCI $CONFIG_ISDN_DIVAS
dep_mbool ' DIVA Server PRI/PCI support' CONFIG_ISDN_DIVAS_PRIPCI $CONFIG_ISDN_DIVAS
dep_tristate ' DIVA CAPI2.0 interface support' CONFIG_ISDN_DIVAS_DIVACAPI $CONFIG_ISDN_DIVAS $CONFIG_ISDN_CAPI
dep_tristate ' DIVA Maint driver support' CONFIG_ISDN_DIVAS_MAINT $CONFIG_ISDN_DIVAS
dep_tristate ' DIVA User-IDI interface support' CONFIG_ISDN_DIVAS_USERIDI $CONFIG_ISDN_DIVAS
fi
endmenu
# Makefile for the Eicon DIVA ISDN drivers.
# Objects that export symbols.
export-objs := diva_didd.o
# Multipart objects.
divas-objs := divasmain.o divasfunc.o di.o io.o istream.o diva.o dlist.o divasproc.o diva_dma.o
divacapi-objs := capimain.o capifunc.o message.o capidtmf.o
divadidd-objs := diva_didd.o diddfunc.o dadapter.o
diva_mnt-objs := divamnt.o mntfunc.o debug.o maintidi.o
diva_idi-objs := divasi.o idifunc.o um_idi.o dqueue.o dlist.o
# Optional parts of multipart objects.
divas-objs-$(CONFIG_ISDN_DIVAS_BRIPCI) += os_bri.o s_bri.o
divas-objs-$(CONFIG_ISDN_DIVAS_4BRIPCI) += os_4bri.o s_4bri.o
divas-objs-$(CONFIG_ISDN_DIVAS_PRIPCI) += os_pri.o s_pri.o
divas-objs += $(sort $(divas-objs-y))
# Each configuration option enables a list of files.
obj-$(CONFIG_ISDN_DIVAS) += divadidd.o divas.o
obj-$(CONFIG_ISDN_DIVAS_MAINT) += diva_mnt.o
obj-$(CONFIG_ISDN_DIVAS_USERIDI) += diva_idi.o
obj-$(CONFIG_ISDN_DIVAS_DIVACAPI) += divacapi.o
include $(TOPDIR)/Rules.make
/* $Id: adapter.h,v 1.1.2.2 2002/10/02 14:38:37 armin Exp $ */
#ifndef __DIVA_USER_MODE_IDI_ADAPTER_H__
#define __DIVA_USER_MODE_IDI_ADAPTER_H__
#define DIVA_UM_IDI_ADAPTER_REMOVED 0x00000001
typedef struct _diva_um_idi_adapter {
diva_entity_link_t link;
DESCRIPTOR d;
int adapter_nr;
diva_entity_queue_t entity_q; /* entities linked to this adapter */
dword status;
} diva_um_idi_adapter_t;
#endif
This diff is collapsed.
This diff is collapsed.
/*
*
Copyright (c) Eicon Networks, 2002.
*
This source file is supplied for the use with
Eicon Networks range of DIVA Server Adapters.
*
Eicon File Revision : 2.1
*
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
*
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
*
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#ifndef CAPIDTMF_H_
#define CAPIDTMF_H_
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
#define CAPIDTMF_TONE_GROUP_COUNT 2
#define CAPIDTMF_LOW_GROUP_FREQUENCIES 4
#define CAPIDTMF_HIGH_GROUP_FREQUENCIES 4
#define DSPDTMF_RX_SENSITIVITY_LOW_DEFAULT 50 /* -52 dBm */
#define DSPDTMF_RX_SENSITIVITY_HIGH_DEFAULT 50 /* -52 dBm */
#define DSPDTMF_RX_HIGH_EXCEEDING_LOW_DEFAULT 10 /* dB */
#define DSPDTMF_RX_LOW_EXCEEDING_HIGH_DEFAULT 10 /* dB */
#define DSPDTMF_RX_HARMONICS_SEL_DEFAULT 12 /* dB */
#define CAPIDTMF_RECV_BASE_FREQUENCY_COUNT (CAPIDTMF_LOW_GROUP_FREQUENCIES + CAPIDTMF_HIGH_GROUP_FREQUENCIES)
#define CAPIDTMF_RECV_GUARD_FREQUENCY_COUNT 8
#define CAPIDTMF_RECV_TOTAL_FREQUENCY_COUNT (CAPIDTMF_RECV_BASE_FREQUENCY_COUNT + CAPIDTMF_RECV_GUARD_FREQUENCY_COUNT)
#define CAPIDTMF_RECV_POSITIVE_COEFF_COUNT 16
#define CAPIDTMF_RECV_NEGATIVE_COEFF_COUNT (CAPIDTMF_RECV_TOTAL_FREQUENCY_COUNT - CAPIDTMF_RECV_POSITIVE_COEFF_COUNT)
#define CAPIDTMF_RECV_ACCUMULATE_CYCLES 205
#define CAPIDTMF_RECV_FUNDAMENTAL_OFFSET (0xff35L * 2)
#define CAPIDTMF_RECV_FUNDAMENTAL_DECREMENT (0x0028L * 2)
#define CAPIDTMF_RECV_DIGIT_BUFFER_SIZE 32
#define CAPIDTMF_RECV_STATE_IDLE 0x00
#define CAPIDTMF_RECV_STATE_DTMF_ACTIVE 0x01
typedef struct tag_capidtmf_recv_state
{
byte digit_buffer[CAPIDTMF_RECV_DIGIT_BUFFER_SIZE];
word digit_write_pos;
word digit_read_pos;
word indication_state;
word indication_state_ack;
long goertzel_buffer[2][CAPIDTMF_RECV_TOTAL_FREQUENCY_COUNT];
word min_gap_duration;
word min_digit_duration;
word cycle_counter;
word current_digit_on_time;
word current_digit_off_time;
byte current_digit_value;
byte state;
} t_capidtmf_recv_state;
typedef struct tag_capidtmf_state
{
byte ulaw;
t_capidtmf_recv_state recv;
} t_capidtmf_state;
word capidtmf_recv_indication (t_capidtmf_state *p_state, byte *buffer);
void capidtmf_recv_block (t_capidtmf_state *p_state, byte *buffer, word length);
void capidtmf_init (t_capidtmf_state *p_state, byte ulaw);
void capidtmf_recv_enable (t_capidtmf_state *p_state, word min_digit_duration, word min_gap_duration);
void capidtmf_recv_disable (t_capidtmf_state *p_state);
#define capidtmf_indication(p_state,buffer) (((p_state)->recv.indication_state != (p_state)->recv.indication_state_ack) ? capidtmf_recv_indication (p_state, buffer) : 0)
#define capidtmf_recv_process_block(p_state,buffer,length) { if ((p_state)->recv.state != CAPIDTMF_RECV_STATE_IDLE) capidtmf_recv_block (p_state, buffer, length); }
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
#endif
This diff is collapsed.
/* $Id: capifunc.h,v 1.1.2.2 2002/10/02 14:38:37 armin Exp $
*
* ISDN interface module for Eicon active cards DIVA.
* CAPI Interface common functions
*
* Copyright 2000-2002 by Armin Schindler (mac@melware.de)
* Copyright 2000-2002 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.
*/
#ifndef __CAPIFUNC_H__
#define __CAPIFUNC_H__
#define MAX_DESCRIPTORS 32
#define DRRELMAJOR 2
#define DRRELMINOR 0
#define DRRELEXTRA ""
#define M_COMPANY "Eicon Networks"
extern char DRIVERRELEASE[];
typedef struct _diva_card {
int Id;
struct _diva_card *next;
struct capi_ctr capi_ctrl;
DIVA_CAPI_ADAPTER *adapter;
DESCRIPTOR d;
char name[32];
} diva_card;
/*
* prototypes
*/
int init_capifunc(void);
void finit_capifunc(void);
#endif /* __CAPIFUNC_H__ */
/* $Id: capimain.c,v 1.1.2.2 2002/10/02 14:38:37 armin Exp $
*
* ISDN interface module for Eicon active cards DIVA.
* CAPI Interface
*
* Copyright 2000-2002 by Armin Schindler (mac@melware.de)
* Copyright 2000-2002 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 <linux/config.h>
#include <linux/module.h>
#include <linux/init.h>
#include <asm/uaccess.h>
#include <linux/smp_lock.h>
#include <linux/vmalloc.h>
#include <linux/sched.h>
#include <linux/skbuff.h>
#include <linux/delay.h>
#include "os_capi.h"
#include "platform.h"
#include "di_defs.h"
#include "capi20.h"
#include "divacapi.h"
#include "cp_vers.h"
#include "capifunc.h"
EXPORT_NO_SYMBOLS;
static char *main_revision = "$Revision: 1.1.2.2 $";
static char *DRIVERNAME = "Eicon DIVA - CAPI Interface driver (http://www.melware.net)";
static char *DRIVERLNAME = "divacapi";
MODULE_DESCRIPTION( "CAPI driver for Eicon DIVA cards");
MODULE_AUTHOR( "Cytronics & Melware, Eicon Networks");
MODULE_SUPPORTED_DEVICE( "CAPI and DIVA card drivers");
MODULE_LICENSE("GPL");
/*
* get revision number from revision string
*/
static char *
getrev(const char *revision)
{
char *rev;
char *p;
if ((p = strchr(revision, ':'))) {
rev = p + 2;
p = strchr(rev, '$');
*--p = 0;
} else rev = "1.0";
return rev;
}
/*
* sleep for some milliseconds
*/
void
diva_os_sleep (dword mSec)
{
unsigned long timeout = HZ * mSec / 1000 + 1;
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(timeout);
}
/*
* wait for some milliseconds
*/
void
diva_os_wait (dword mSec)
{
mdelay (mSec);
}
/*
* alloc memory
*/
void* diva_os_malloc (unsigned long flags, unsigned long size)
{
void* ret = NULL;
if (size) {
ret = (void *)vmalloc((unsigned int)size);
}
return(ret);
}
/*
* free memory
*/
void diva_os_free(unsigned long unused, void* ptr)
{
if (ptr) {
vfree(ptr);
}
}
/*
* alloc a message buffer
*/
diva_os_message_buffer_s *
diva_os_alloc_message_buffer(unsigned long size, void **data_buf)
{
diva_os_message_buffer_s *dmb = alloc_skb(size, GFP_ATOMIC);
if (dmb) {
*data_buf = skb_put(dmb, size);
}
return(dmb);
}
/*
* free a message buffer
*/
void diva_os_free_message_buffer(diva_os_message_buffer_s *dmb)
{
kfree_skb(dmb);
}
/*
* proc function for controller info
*/
static int diva_ctl_read_proc(char *page, char **start, off_t off,int count, int *eof, struct capi_ctr *ctrl)
{
diva_card *card = (diva_card *)ctrl->driverdata;
int len = 0;
len += sprintf(page+len, "%s\n", ctrl->name);
len += sprintf(page+len, "Serial No. : %s\n", ctrl->serial);
len += sprintf(page+len, "Id : %d\n", card->Id);
len += sprintf(page+len, "Channels : %d\n", card->d.channels);
if (off + count >= len)
*eof = 1;
if (len < off)
return 0;
*start = page + off;
return((count < len-off) ? count : len-off);
}
/*
* set additional os settings in capi_ctr struct
*/
void diva_os_set_controller_struct(struct capi_ctr *ctrl)
{
ctrl->driver_name = DRIVERLNAME;
ctrl->load_firmware = 0;
ctrl->reset_ctr = 0;
ctrl->ctr_read_proc = diva_ctl_read_proc;
SET_MODULE_OWNER(ctrl);
}
/*
* module init
*/
static int DIVA_INIT_FUNCTION
divacapi_init(void)
{
char tmprev[32];
int ret = 0;
MOD_INC_USE_COUNT;
sprintf(DRIVERRELEASE, "%d.%d%s", DRRELMAJOR, DRRELMINOR, DRRELEXTRA);
printk(KERN_INFO "%s\n", DRIVERNAME);
printk(KERN_INFO "%s: Rel:%s Rev:", DRIVERLNAME, DRIVERRELEASE);
strcpy(tmprev, main_revision);
printk("%s Build: %s(%s)\n", getrev(tmprev),
diva_capi_common_code_build, DIVA_BUILD);
if (!(init_capifunc()))
{
printk(KERN_ERR "%s: failed init capi_driver.\n", DRIVERLNAME);
ret = -EIO;
}
MOD_DEC_USE_COUNT;
return ret;
}
/*
* module exit
*/
static void DIVA_EXIT_FUNCTION
divacapi_exit(void)
{
finit_capifunc();
printk(KERN_INFO "%s: module unloaded.\n", DRIVERLNAME);
}
module_init(divacapi_init);
module_exit(divacapi_exit);
This diff is collapsed.
/*
*
Copyright (c) Eicon Networks, 2002.
*
This source file is supplied for the use with
Eicon Networks range of DIVA Server Adapters.
*
Eicon File Revision : 2.1
*
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
*
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
*
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
static char diva_capi_common_code_build[] = "102-28";
This diff is collapsed.
/*
*
Copyright (c) Eicon Networks, 2002.
*
This source file is supplied for the use with
Eicon Networks range of DIVA Server Adapters.
*
Eicon File Revision : 2.1
*
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
*
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
*
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#ifndef __DIVA_DIDD_DADAPTER_INC__
#define __DIVA_DIDD_DADAPTER_INC__
void diva_didd_load_time_init (void);
void diva_didd_load_time_finit (void);
int diva_didd_add_descriptor (DESCRIPTOR* d);
int diva_didd_remove_descriptor (IDI_CALL request);
int diva_didd_read_adapter_array (DESCRIPTOR* buffer, int length);
#define OLD_MAX_DESCRIPTORS 16
#define NEW_MAX_DESCRIPTORS 64
#endif
/*
*
Copyright (c) Eicon Technology Corporation, 2000.
*
This source file is supplied for the use with Eicon
Technology Corporation's range of DIVA Server Adapters.
*
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
*
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
*
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
/*------------------------------------------------------------------*/
/* file: dbgioctl.h */
/*------------------------------------------------------------------*/
#if !defined(__DBGIOCTL_H__)
#define __DBGIOCTL_H__
#ifdef NOT_YET_NEEDED
/*
* The requested operation is passed in arg0 of DbgIoctlArgs,
* additional arguments (if any) in arg1, arg2 and arg3.
*/
typedef struct
{ ULONG arg0 ;
ULONG arg1 ;
ULONG arg2 ;
ULONG arg3 ;
} DbgIoctlArgs ;
#define DBG_COPY_LOGS 0 /* copy debugs to user until buffer full */
/* arg1: size threshold */
/* arg2: timeout in milliseconds */
#define DBG_FLUSH_LOGS 1 /* flush pending debugs to user buffer */
/* arg1: internal driver id */
#define DBG_LIST_DRVS 2 /* return the list of registered drivers */
#define DBG_GET_MASK 3 /* get current debug mask of driver */
/* arg1: internal driver id */
#define DBG_SET_MASK 4 /* set/change debug mask of driver */
/* arg1: internal driver id */
/* arg2: new debug mask */
#define DBG_GET_BUFSIZE 5 /* get current buffer size of driver */
/* arg1: internal driver id */
/* arg2: new debug mask */
#define DBG_SET_BUFSIZE 6 /* set new buffer size of driver */
/* arg1: new buffer size */
/*
* common internal debug message structure
*/
typedef struct
{ unsigned short id ; /* virtual driver id */
unsigned short type ; /* special message type */
unsigned long seq ; /* sequence number of message */
unsigned long size ; /* size of message in bytes */
unsigned long next ; /* offset to next buffered message */
LARGE_INTEGER NTtime ; /* 100 ns since 1.1.1601 */
unsigned char data[4] ;/* message data */
} OldDbgMessage ;
typedef struct
{ LARGE_INTEGER NTtime ; /* 100 ns since 1.1.1601 */
unsigned short size ; /* size of message in bytes */
unsigned short ffff ; /* always 0xffff to indicate new msg */
unsigned short id ; /* virtual driver id */
unsigned short type ; /* special message type */
unsigned long seq ; /* sequence number of message */
unsigned char data[4] ;/* message data */
} DbgMessage ;
#endif
#define DRV_ID_UNKNOWN 0x0C /* for messages via prtComp() */
#define MSG_PROC_FLAG 0x80
#define MSG_PROC_NO_GET(x) (((x) & MSG_PROC_FLAG) ? (((x) >> 4) & 7) : -1)
#define MSG_PROC_NO_SET(x) (MSG_PROC_FLAG | (((x) & 7) << 4))
#define MSG_TYPE_DRV_ID 0x0001
#define MSG_TYPE_FLAGS 0x0002
#define MSG_TYPE_STRING 0x0003
#define MSG_TYPE_BINARY 0x0004
#define MSG_HEAD_SIZE ((unsigned long)&(((DbgMessage *)0)->data[0]))
#define MSG_ALIGN(len) (((unsigned long)(len) + MSG_HEAD_SIZE + 3) & ~3)
#define MSG_SIZE(pMsg) MSG_ALIGN((pMsg)->size)
#define MSG_NEXT(pMsg) ((DbgMessage *)( ((char *)(pMsg)) + MSG_SIZE(pMsg) ))
#define OLD_MSG_HEAD_SIZE ((unsigned long)&(((OldDbgMessage *)0)->data[0]))
#define OLD_MSG_ALIGN(len) (((unsigned long)(len)+OLD_MSG_HEAD_SIZE+3) & ~3)
/*
* manifest constants
*/
#define MSG_FRAME_MAX_SIZE 2150 /* maximum size of B1 frame */
#define MSG_TEXT_MAX_SIZE 1024 /* maximum size of msg text */
#define MSG_MAX_SIZE MSG_ALIGN(MSG_FRAME_MAX_SIZE)
#define DBG_MIN_BUFFER_SIZE 0x00008000 /* minimal total buffer size 32 KB */
#define DBG_DEF_BUFFER_SIZE 0x00020000 /* default total buffer size 128 KB */
#define DBG_MAX_BUFFER_SIZE 0x00400000 /* maximal total buffer size 4 MB */
#define DBGDRV_NAME "Diehl_DIMAINT"
#define UNIDBG_DRIVER L"\\Device\\Diehl_DIMAINT" /* UNICODE name for kernel */
#define DEBUG_DRIVER "\\\\.\\" DBGDRV_NAME /* traditional string for apps */
#define DBGVXD_NAME "DIMAINT"
#define DEBUG_VXD "\\\\.\\" DBGVXD_NAME /* traditional string for apps */
/*
* Special IDI interface debug construction
*/
#define DBG_IDI_SIG_REQ (unsigned long)0xF479C402
#define DBG_IDI_SIG_IND (unsigned long)0xF479C403
#define DBG_IDI_NL_REQ (unsigned long)0xF479C404
#define DBG_IDI_NL_IND (unsigned long)0xF479C405
typedef struct
{ unsigned long magic_type ;
unsigned short data_len ;
unsigned char layer_ID ;
unsigned char entity_ID ;
unsigned char request ;
unsigned char ret_code ;
unsigned char indication ;
unsigned char complete ;
unsigned char data[4] ;
} DbgIdiAct, *DbgIdiAction ;
/*
* We want to use the same IOCTL codes in Win95 and WinNT.
* The official constructor for IOCTL codes is the CTL_CODE macro
* from <winoctl.h> (<devioctl.h> in WinNT DDK environment).
* The problem here is that we don't know how to get <winioctl.h>
* working in a Win95 DDK environment!
*/
# ifdef CTL_CODE /*{*/
/* Assert that we have the same idea of the CTL_CODE macro. */
#define CTL_CODE( DeviceType, Function, Method, Access ) ( \
((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method) \
)
# else /* !CTL_CODE */ /*}{*/
/* Use the definitions stolen from <winioctl.h>. */
#define CTL_CODE( DeviceType, Function, Method, Access ) ( \
((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method) \
)
#define METHOD_BUFFERED 0
#define METHOD_IN_DIRECT 1
#define METHOD_OUT_DIRECT 2
#define METHOD_NEITHER 3
#define FILE_ANY_ACCESS 0
#define FILE_READ_ACCESS ( 0x0001 ) // file & pipe
#define FILE_WRITE_ACCESS ( 0x0002 ) // file & pipe
# endif /* CTL_CODE */ /*}*/
/*
* Now we can define WinNT/Win95 DeviceIoControl codes.
*
* These codes are defined in di_defs.h too, a possible mismatch will be
* detected when the dbgtool is compiled.
*/
#define IOCTL_DRIVER_LNK \
CTL_CODE(0x8001U,0x701,METHOD_OUT_DIRECT,FILE_ANY_ACCESS)
#define IOCTL_DRIVER_DBG \
CTL_CODE(0x8001U,0x702,METHOD_OUT_DIRECT,FILE_ANY_ACCESS)
#endif /* __DBGIOCTL_H__ */
This diff is collapsed.
/*
*
Copyright (c) Eicon Technology Corporation, 2000.
*
This source file is supplied for the use with Eicon
Technology Corporation's range of DIVA Server Adapters.
*
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
*
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
*
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#ifndef __DIVA_DEBUG_IF_H__
#define __DIVA_DEBUG_IF_H__
#define MSG_TYPE_DRV_ID 0x0001
#define MSG_TYPE_FLAGS 0x0002
#define MSG_TYPE_STRING 0x0003
#define MSG_TYPE_BINARY 0x0004
#define MSG_TYPE_MLOG 0x0005
#define MSG_FRAME_MAX_SIZE 2150
typedef struct _diva_dbg_entry_head {
dword sequence;
dword time_sec;
dword time_usec;
dword facility;
dword dli;
dword drv_id;
dword di_cpu;
dword data_length;
} diva_dbg_entry_head_t;
int diva_maint_init (byte* base, unsigned long length, int do_init);
void* diva_maint_finit (void);
dword diva_dbg_q_length (void);
diva_dbg_entry_head_t* diva_maint_get_message (word* size,
diva_os_spin_lock_magic_t* old_irql);
void diva_maint_ack_message (int do_release,
diva_os_spin_lock_magic_t* old_irql);
void diva_maint_prtComp (char *format, ...);
void diva_maint_wakeup_read (void);
int diva_get_driver_info (dword id, byte* data, int data_length);
int diva_get_driver_dbg_mask (dword id, byte* data);
int diva_set_driver_dbg_mask (dword id, dword mask);
void diva_mnt_remove_xdi_adapter (const DESCRIPTOR* d);
void diva_mnt_add_xdi_adapter (const DESCRIPTOR* d);
int diva_mnt_shutdown_xdi_adapters (void);
#define DITRACE_CMD_GET_DRIVER_INFO 1
#define DITRACE_READ_DRIVER_DBG_MASK 2
#define DITRACE_WRITE_DRIVER_DBG_MASK 3
#define DITRACE_READ_TRACE_ENTRY 4
#define DITRACE_READ_TRACE_ENTRYS 5
/*
Trace lavels for debug via management interface
*/
#define DIVA_MGT_DBG_TRACE 0x00000001 /* All trace messages from the card */
#define DIVA_MGT_DBG_DCHAN 0x00000002 /* All D-channel relater trace messages */
#define DIVA_MGT_DBG_MDM_PROGRESS 0x00000004 /* Modem progress events */
#define DIVA_MGT_DBG_FAX_PROGRESS 0x00000008 /* Fax progress events */
#define DIVA_MGT_DBG_IFC_STATISTICS 0x00000010 /* Interface call statistics */
#define DIVA_MGT_DBG_MDM_STATISTICS 0x00000020 /* Global modem statistics */
#define DIVA_MGT_DBG_FAX_STATISTICS 0x00000040 /* Global call statistics */
#define DIVA_MGT_DBG_LINE_EVENTS 0x00000080 /* Line state events */
#define DIVA_MGT_DBG_IFC_EVENTS 0x00000100 /* Interface/L1/L2 state events */
#define DIVA_MGT_DBG_IFC_BCHANNEL 0x00000200 /* B-Channel trace for all channels */
#define DIVA_MGT_DBG_IFC_AUDIO 0x00000400 /* Audio Tap trace for all channels */
# endif /* DEBUG_IF___H */
This diff is collapsed.
This diff is collapsed.
/*
*
Copyright (c) Eicon Networks, 2002.
*
This source file is supplied for the use with
Eicon Networks range of DIVA Server Adapters.
*
Eicon File Revision : 2.1
*
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
*
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
*
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#ifndef __DIVA_IDI_DFIFO_INC__
#define __DIVA_IDI_DFIFO_INC__
#define DIVA_DFIFO_CACHE_SZ 64 /* Used to isolate pipe from
rest of the world
should be divisible by 4
*/
#define DIVA_DFIFO_RAW_SZ (2512*8)
#define DIVA_DFIFO_DATA_SZ 68
#define DIVA_DFIFO_HDR_SZ 4
#define DIVA_DFIFO_SEGMENT_SZ (DIVA_DFIFO_DATA_SZ+DIVA_DFIFO_HDR_SZ)
#define DIVA_DFIFO_SEGMENTS ((DIVA_DFIFO_RAW_SZ)/(DIVA_DFIFO_SEGMENT_SZ)+1)
#define DIVA_DFIFO_MEM_SZ (\
(DIVA_DFIFO_SEGMENT_SZ)*(DIVA_DFIFO_SEGMENTS)+\
(DIVA_DFIFO_CACHE_SZ)*2\
)
#define DIVA_DFIFO_STEP DIVA_DFIFO_SEGMENT_SZ
/* -------------------------------------------------------------------------
Block header layout is:
byte[0] -> flags
byte[1] -> length of data in block
byte[2] -> reserved
byte[4] -> reserved
------------------------------------------------------------------------- */
#define DIVA_DFIFO_WRAP 0x80 /* This is the last block in fifo */
#define DIVA_DFIFO_READY 0x40 /* This block is ready for processing */
#define DIVA_DFIFO_LAST 0x20 /* This block is last in message */
#define DIVA_DFIFO_AUTO 0x10 /* Don't look for 'ready', don't ack */
int diva_dfifo_create (void* start, int length);
#endif
This diff is collapsed.
This diff is collapsed.
/*
*
Copyright (c) Eicon Networks, 2002.
*
This source file is supplied for the use with
Eicon Networks range of DIVA Server Adapters.
*
Eicon File Revision : 2.1
*
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
*
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
*
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#ifndef __DIVA_DI_DBG_INC__
#define __DIVA_DI_DBG_INC__
#if !defined (dtrc)
#define dtrc(a)
#endif
#if !defined (dbug)
#define dbug(a)
#endif
#if !defined USE_EXTENDED_DEBUGS
extern void (*dprintf)(char*, ...);
#endif
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment