Commit a8d62195 authored by Olof Johansson's avatar Olof Johansson Committed by David S. Miller

ISDN: eicon: Remove driver

I started looking at the history of this driver, and last time the
maintainer was active on the mailing list was when discussing how to
remove it. This was in 2012:

https://lore.kernel.org/lkml/4F4DE175.30002@melware.de/

It looks to me like this has in practice been an orphan for quite a while.
It's throwing warnings about stack size in a function that is in dire
need of refactoring, and it's probably a case of "it's time to call it".

Cc: Armin Schindler <mac@melware.de>
Cc: Karsten Keil <isdn@linux-pingi.de>
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8053e5b9
......@@ -7843,13 +7843,6 @@ F: include/linux/isdn/
F: include/uapi/linux/isdn.h
F: include/uapi/linux/isdn/
ISDN SUBSYSTEM (Eicon active card driver)
M: Armin Schindler <mac@melware.de>
L: isdn4linux@listserv.isdn4linux.de (subscribers-only)
W: http://www.melware.de
S: Maintained
F: drivers/isdn/hardware/eicon/
IT87 HARDWARE MONITORING DRIVER
M: Jean Delvare <jdelvare@suse.com>
L: linux-hwmon@vger.kernel.org
......
......@@ -5,5 +5,3 @@ comment "CAPI hardware drivers"
source "drivers/isdn/hardware/avm/Kconfig"
source "drivers/isdn/hardware/eicon/Kconfig"
......@@ -3,5 +3,4 @@
# Object files in subdirectories
obj-$(CONFIG_CAPI_AVM) += avm/
obj-$(CONFIG_CAPI_EICON) += eicon/
obj-$(CONFIG_MISDN) += mISDN/
#
# ISDN DIVAS Eicon driver
#
menuconfig CAPI_EICON
bool "Active Eicon DIVA Server cards"
help
Enable support for Eicon Networks active ISDN cards.
if CAPI_EICON
config ISDN_DIVAS
tristate "Support Eicon DIVA Server cards"
depends on PROC_FS && PCI
help
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.
if ISDN_DIVAS
config ISDN_DIVAS_BRIPCI
bool "DIVA Server BRI/PCI support"
help
Enable support for DIVA Server BRI-PCI.
config ISDN_DIVAS_PRIPCI
bool "DIVA Server PRI/PCI support"
help
Enable support for DIVA Server PRI-PCI.
config ISDN_DIVAS_DIVACAPI
tristate "DIVA CAPI2.0 interface support"
help
You need this to provide the CAPI interface
for DIVA Server cards.
config ISDN_DIVAS_USERIDI
tristate "DIVA User-IDI interface support"
help
Enable support for user-mode IDI interface.
config ISDN_DIVAS_MAINT
tristate "DIVA Maint driver support"
depends on m
help
Enable Divas Maintenance driver.
endif # ISDN_DIVAS
endif # CAPI_EICON
# SPDX-License-Identifier: GPL-2.0
# Makefile for the Eicon DIVA ISDN drivers.
# 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
# Multipart objects.
divas-y := divasmain.o divasfunc.o di.o io.o istream.o \
diva.o divasproc.o diva_dma.o
divas-$(CONFIG_ISDN_DIVAS_BRIPCI) += os_bri.o s_bri.o os_4bri.o s_4bri.o
divas-$(CONFIG_ISDN_DIVAS_PRIPCI) += os_pri.o s_pri.o
divacapi-y := capimain.o capifunc.o message.o capidtmf.o
divadidd-y := diva_didd.o diddfunc.o dadapter.o
diva_mnt-y := divamnt.o mntfunc.o debug.o maintidi.o
diva_idi-y := divasi.o idifunc.o um_idi.o dqueue.o
/* SPDX-License-Identifier: GPL-2.0 */
/* $Id: adapter.h,v 1.4 2004/03/21 17:26:01 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 {
struct list_head link;
DESCRIPTOR d;
int adapter_nr;
struct list_head 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.11.4.1 2004/08/28 20:03:53 armin Exp $
*
* ISDN interface module for Eicon active cards DIVA.
* CAPI Interface common functions
*
* Copyright 2000-2003 by Armin Schindler (mac@melware.de)
* Copyright 2000-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.
*/
#ifndef __CAPIFUNC_H__
#define __CAPIFUNC_H__
#define DRRELMAJOR 2
#define DRRELMINOR 0
#define DRRELEXTRA ""
#define M_COMPANY "Eicon Networks"
extern char DRIVERRELEASE_CAPI[];
typedef struct _diva_card {
struct list_head list;
int remove_in_progress;
int Id;
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.24 2003/09/09 06:51:05 schindler Exp $
*
* ISDN interface module for Eicon active cards DIVA.
* CAPI Interface
*
* Copyright 2000-2003 by Armin Schindler (mac@melware.de)
* Copyright 2000-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 <linux/module.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/uaccess.h>
#include <linux/seq_file.h>
#include <linux/skbuff.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"
static char *main_revision = "$Revision: 1.24 $";
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;
}
/*
* 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_proc_show(struct seq_file *m, void *v)
{
struct capi_ctr *ctrl = m->private;
diva_card *card = (diva_card *) ctrl->driverdata;
seq_printf(m, "%s\n", ctrl->name);
seq_printf(m, "Serial No. : %s\n", ctrl->serial);
seq_printf(m, "Id : %d\n", card->Id);
seq_printf(m, "Channels : %d\n", card->d.channels);
return 0;
}
/*
* 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 = NULL;
ctrl->reset_ctr = NULL;
ctrl->proc_show = diva_ctl_proc_show;
ctrl->owner = THIS_MODULE;
}
/*
* module init
*/
static int __init divacapi_init(void)
{
char tmprev[32];
int ret = 0;
sprintf(DRIVERRELEASE_CAPI, "%d.%d%s", DRRELMAJOR, DRRELMINOR,
DRRELEXTRA);
printk(KERN_INFO "%s\n", DRIVERNAME);
printk(KERN_INFO "%s: Rel:%s Rev:", DRIVERLNAME, DRIVERRELEASE_CAPI);
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;
}
return ret;
}
/*
* module exit
*/
static void __exit 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);
#define NEW_MAX_DESCRIPTORS 64
#endif
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 DIVA_MAX_SELECTIVE_FILTER_LENGTH 127
int diva_set_trace_filter(int filter_length, const char *filter);
int diva_get_trace_filter(int max_length, char *filter);
#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
#define DITRACE_WRITE_SELECTIVE_TRACE_FILTER 6
#define DITRACE_READ_SELECTIVE_TRACE_FILTER 7
/*
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 */
/*
*
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.
*
*/
#include "debuglib.h"
#ifdef DIVA_NO_DEBUGLIB
static DIVA_DI_PRINTF dprintf;
#else /* DIVA_NO_DEBUGLIB */
_DbgHandle_ myDriverDebugHandle = { 0 /*!Registered*/, DBG_HANDLE_VERSION };
DIVA_DI_PRINTF dprintf = no_printf;
/*****************************************************************************/
#define DBG_FUNC(name) \
void \
myDbgPrint_##name(char *format, ...) \
{ va_list ap; \
if (myDriverDebugHandle.dbg_prt) \
{ va_start(ap, format); \
(myDriverDebugHandle.dbg_prt) \
(myDriverDebugHandle.id, DLI_##name, format, ap); \
va_end(ap); \
} }
DBG_FUNC(LOG)
DBG_FUNC(FTL)
DBG_FUNC(ERR)
DBG_FUNC(TRC)
DBG_FUNC(MXLOG)
DBG_FUNC(FTL_MXLOG)
void
myDbgPrint_EVL(long msgID, ...)
{ va_list ap;
if (myDriverDebugHandle.dbg_ev)
{ va_start(ap, msgID);
(myDriverDebugHandle.dbg_ev)
(myDriverDebugHandle.id, (unsigned long)msgID, ap);
va_end(ap);
} }
DBG_FUNC(REG)
DBG_FUNC(MEM)
DBG_FUNC(SPL)
DBG_FUNC(IRP)
DBG_FUNC(TIM)
DBG_FUNC(BLK)
DBG_FUNC(TAPI)
DBG_FUNC(NDIS)
DBG_FUNC(CONN)
DBG_FUNC(STAT)
DBG_FUNC(SEND)
DBG_FUNC(RECV)
DBG_FUNC(PRV0)
DBG_FUNC(PRV1)
DBG_FUNC(PRV2)
DBG_FUNC(PRV3)
/*****************************************************************************/
int
DbgRegister(char *drvName, char *drvTag, unsigned long dbgMask)
{
int len;
/*
* deregister (if already registered) and zero out myDriverDebugHandle
*/
DbgDeregister();
/*
* initialize the debug handle
*/
myDriverDebugHandle.Version = DBG_HANDLE_VERSION;
myDriverDebugHandle.id = -1;
myDriverDebugHandle.dbgMask = dbgMask | (DL_EVL | DL_FTL | DL_LOG);
len = strlen(drvName);
memcpy(myDriverDebugHandle.drvName, drvName,
(len < sizeof(myDriverDebugHandle.drvName)) ?
len : sizeof(myDriverDebugHandle.drvName) - 1);
len = strlen(drvTag);
memcpy(myDriverDebugHandle.drvTag, drvTag,
(len < sizeof(myDriverDebugHandle.drvTag)) ?
len : sizeof(myDriverDebugHandle.drvTag) - 1);
/*
* Try to register debugging via old (and only) interface
*/
dprintf("\000\377", &myDriverDebugHandle);
if (myDriverDebugHandle.dbg_prt)
{
return (1);
}
/*
* Check if we registered with an old maint driver (see debuglib.h)
*/
if (myDriverDebugHandle.dbg_end != NULL
/* location of 'dbg_prt' in _OldDbgHandle_ struct */
&& (myDriverDebugHandle.regTime.LowPart ||
myDriverDebugHandle.regTime.HighPart))
/* same location as in _OldDbgHandle_ struct */
{
dprintf("%s: Cannot log to old maint driver !", drvName);
myDriverDebugHandle.dbg_end =
((_OldDbgHandle_ *)&myDriverDebugHandle)->dbg_end;
DbgDeregister();
}
return (0);
}
/*****************************************************************************/
void
DbgSetLevel(unsigned long dbgMask)
{
myDriverDebugHandle.dbgMask = dbgMask | (DL_EVL | DL_FTL | DL_LOG);
}
/*****************************************************************************/
void
DbgDeregister(void)
{
if (myDriverDebugHandle.dbg_end)
{
(myDriverDebugHandle.dbg_end)(&myDriverDebugHandle);
}
memset(&myDriverDebugHandle, 0, sizeof(myDriverDebugHandle));
}
void xdi_dbg_xlog(char *x, ...) {
va_list ap;
va_start(ap, x);
if (myDriverDebugHandle.dbg_end &&
(myDriverDebugHandle.dbg_irq || myDriverDebugHandle.dbg_old) &&
(myDriverDebugHandle.dbgMask & DL_STAT)) {
if (myDriverDebugHandle.dbg_irq) {
(*(myDriverDebugHandle.dbg_irq))(myDriverDebugHandle.id,
(x[0] != 0) ? DLI_TRC : DLI_XLOG, x, ap);
} else {
(*(myDriverDebugHandle.dbg_old))(myDriverDebugHandle.id, x, ap);
}
}
va_end(ap);
}
/*****************************************************************************/
#endif /* DIVA_NO_DEBUGLIB */
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.
/*
*
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.
*
*/
/*
* some macros for detailed trace management
*/
#include "di_dbg.h"
/*****************************************************************************/
#define XMOREC 0x1f
#define XMOREF 0x20
#define XBUSY 0x40
#define RMORE 0x80
#define DIVA_MISC_FLAGS_REMOVE_PENDING 0x01
#define DIVA_MISC_FLAGS_NO_RC_CANCELLING 0x02
#define DIVA_MISC_FLAGS_RX_DMA 0x04
/* structure for all information we have to keep on a per */
/* adapater basis */
typedef struct adapter_s ADAPTER;
struct adapter_s {
void *io;
byte IdTable[256];
byte IdTypeTable[256];
byte FlowControlIdTable[256];
byte FlowControlSkipTable[256];
byte ReadyInt;
byte RcExtensionSupported;
byte misc_flags_table[256];
dword protocol_capabilities;
byte (*ram_in)(ADAPTER *a, void *adr);
word (*ram_inw)(ADAPTER *a, void *adr);
void (*ram_in_buffer)(ADAPTER *a, void *adr, void *P, word length);
void (*ram_look_ahead)(ADAPTER *a, PBUFFER *RBuffer, ENTITY *e);
void (*ram_out)(ADAPTER *a, void *adr, byte data);
void (*ram_outw)(ADAPTER *a, void *adr, word data);
void (*ram_out_buffer)(ADAPTER *a, void *adr, void *P, word length);
void (*ram_inc)(ADAPTER *a, void *adr);
#if defined(DIVA_ISTREAM)
dword rx_stream[256];
dword tx_stream[256];
word tx_pos[256];
word rx_pos[256];
byte stream_buffer[2512];
dword (*ram_offset)(ADAPTER *a);
void (*ram_out_dw)(ADAPTER *a,
void *addr,
const dword *data,
int dwords);
void (*ram_in_dw)(ADAPTER *a,
void *addr,
dword *data,
int dwords);
void (*istream_wakeup)(ADAPTER *a);
#else
byte stream_buffer[4];
#endif
};
/*------------------------------------------------------------------*/
/* public functions of IDI common code */
/*------------------------------------------------------------------*/
void pr_out(ADAPTER *a);
byte pr_dpc(ADAPTER *a);
byte scom_test_int(ADAPTER *a);
void scom_clear_int(ADAPTER *a);
/*------------------------------------------------------------------*/
/* OS specific functions used by IDI common code */
/*------------------------------------------------------------------*/
void free_entity(ADAPTER *a, byte e_no);
void assign_queue(ADAPTER *a, byte e_no, word ref);
byte get_assign(ADAPTER *a, word ref);
void req_queue(ADAPTER *a, byte e_no);
byte look_req(ADAPTER *a);
void next_req(ADAPTER *a);
ENTITY *entity_ptr(ADAPTER *a, byte e_no);
#if defined(DIVA_ISTREAM)
struct _diva_xdi_stream_interface;
void diva_xdi_provide_istream_info(ADAPTER *a,
struct _diva_xdi_stream_interface *pI);
void pr_stream(ADAPTER *a);
int diva_istream_write(void *context,
int Id,
void *data,
int length,
int final,
byte usr1,
byte usr2);
int diva_istream_read(void *context,
int Id,
void *data,
int max_length,
int *final,
byte *usr1,
byte *usr2);
#if defined(DIVA_IDI_RX_DMA)
#include "diva_dma.h"
#endif
#endif
/*
*
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.
/*
*
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_didd_common_code_build[] = "102-51";
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/* SPDX-License-Identifier: GPL-2.0 */
/* $Id: diva_pci.h,v 1.6 2003/01/04 15:29:45 schindler Exp $ */
#ifndef __DIVA_PCI_INTERFACE_H__
#define __DIVA_PCI_INTERFACE_H__
void __iomem *divasa_remap_pci_bar(diva_os_xdi_adapter_t *a,
int id,
unsigned long bar,
unsigned long area_length);
void divasa_unmap_pci_bar(void __iomem *bar);
unsigned long divasa_get_pci_irq(unsigned char bus,
unsigned char func, void *pci_dev_handle);
unsigned long divasa_get_pci_bar(unsigned char bus,
unsigned char func,
int bar, void *pci_dev_handle);
byte diva_os_get_pci_bus(void *pci_dev_handle);
byte diva_os_get_pci_func(void *pci_dev_handle);
#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.
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