back-port from new cvs server: use own copies of drivers/isdn/eicon/
kernel include files.
This commit is contained in:
parent
6cd0a052d1
commit
0bcbe27454
|
@ -1,4 +1,4 @@
|
|||
# $Id: Makefile.in,v 1.6 2000/03/25 12:56:40 armin Exp $
|
||||
# $Id: Makefile.in,v 1.7 2002/07/19 18:42:01 armin Exp $
|
||||
#
|
||||
# Makefile for eiconctrl
|
||||
# (C) 1997 Fritz Elfert
|
||||
|
@ -8,7 +8,7 @@
|
|||
|
||||
SHELL = /bin/sh
|
||||
CFLAGS = -Wall -O2 -DUNIX -DLINUX
|
||||
INCLUDES = -I. -I@CONFIG_KERNELDIR@/include -I@CONFIG_KERNELDIR@/drivers/isdn/eicon
|
||||
INCLUDES = -I. -Iinclude
|
||||
LDFLAGS = -L../lib @LIBS@
|
||||
PROGRAMS =
|
||||
PROGRAM = eiconctrl
|
||||
|
|
|
@ -1,64 +0,0 @@
|
|||
sinclude(../etc/ackernel.m4)dnl
|
||||
|
||||
dnl
|
||||
dnl Check for XLOG
|
||||
dnl
|
||||
|
||||
AC_DEFUN(AC_CHECK_XLOG, [
|
||||
OLD_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="-nostdinc -I${CONFIG_KERNELDIR} -I/usr/include"
|
||||
have_xlog="no"
|
||||
AC_MSG_CHECKING([for XLOG in ${CONFIG_KERNELDIR}/drivers/isdn/eicon/eicon.h])
|
||||
AC_TRY_COMPILE([#include <linux/types.h>
|
||||
#include <drivers/isdn/eicon/eicon.h>],int x = XLOG_OK;,have_xlog="yes",)
|
||||
AC_MSG_RESULT("${have_xlog}")
|
||||
CPPFLAGS="$OLD_CPPFLAGS"
|
||||
if test "$have_xlog" != "no" ; then
|
||||
AC_DEFINE(HAVE_XLOG)
|
||||
fi
|
||||
AC_SUBST(HAVE_XLOG)
|
||||
])
|
||||
|
||||
|
||||
dnl
|
||||
dnl Check for TRACE
|
||||
dnl
|
||||
|
||||
AC_DEFUN(AC_CHECK_TRACE, [
|
||||
OLD_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="-nostdinc -I${CONFIG_KERNELDIR} -I/usr/include"
|
||||
have_trace="no"
|
||||
AC_MSG_CHECKING([for TRACE in ${CONFIG_KERNELDIR}/drivers/isdn/eicon/eicon.h])
|
||||
AC_TRY_COMPILE([#include <linux/types.h>
|
||||
#include <drivers/isdn/eicon/eicon.h>],int x = TRACE_OK;,have_trace="yes",)
|
||||
AC_MSG_RESULT("${have_trace}")
|
||||
CPPFLAGS="$OLD_CPPFLAGS"
|
||||
if test "$have_trace" != "no" ; then
|
||||
AC_DEFINE(HAVE_TRACE)
|
||||
fi
|
||||
AC_SUBST(HAVE_TRACE)
|
||||
])
|
||||
|
||||
|
||||
dnl
|
||||
dnl Check for PCI in native driver
|
||||
dnl
|
||||
|
||||
AC_DEFUN(AC_CHECK_NPCI, [
|
||||
OLD_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="-nostdinc -I${CONFIG_KERNELDIR} -I/usr/include"
|
||||
have_npci="no"
|
||||
HAVE_NATIVE="n"
|
||||
AC_MSG_CHECKING([for pci code in ${CONFIG_KERNELDIR}/drivers/isdn/eicon/eicon.h])
|
||||
AC_TRY_COMPILE([#include <linux/types.h>
|
||||
#include <drivers/isdn/eicon/eicon.h>],eicon_pci_codebuf *p = NULL;,have_npci="yes",)
|
||||
AC_MSG_RESULT("${have_npci}")
|
||||
CPPFLAGS="$OLD_CPPFLAGS"
|
||||
if test "$have_npci" != "no" ; then
|
||||
AC_DEFINE(HAVE_NPCI)
|
||||
HAVE_NATIVE="y"
|
||||
fi
|
||||
AC_SUBST(HAVE_NPCI)
|
||||
AC_SUBST(HAVE_NATIVE)
|
||||
])
|
||||
|
|
@ -12,16 +12,12 @@ ac_help=
|
|||
ac_default_prefix=/usr/local
|
||||
# Any additions from configure.in:
|
||||
ac_default_prefix="/usr"
|
||||
ac_help="$ac_help
|
||||
--with-kernel=DIR Set kernel source directory [/usr/src/linux]"
|
||||
ac_help="$ac_help
|
||||
--with-firmware=DIR Set dir where firmware istalled. [/usr/lib/isdn]"
|
||||
ac_help="$ac_help
|
||||
--with-sbin=DIR Set dir where binary is istalled. [/sbin]"
|
||||
ac_help="$ac_help
|
||||
--with-man=DIR Set manpage dir. [/usr/man]"
|
||||
ac_help="$ac_help
|
||||
--with-kernel=DIR Set kernel dir. [/usr/src/linux]"
|
||||
ac_help="$ac_help
|
||||
--enable-dump Enable dump feature for debugging [no]"
|
||||
|
||||
|
@ -541,7 +537,6 @@ CONFIG_DATADIR=${CONFIG_DATADIR:-"/usr/lib/isdn/eicon"}
|
|||
CONFIG_SBINDIR=${CONFIG_SBINDIR:-"/sbin"}
|
||||
CONFIG_MANDIR=${CONFIG_MANDIR:-"/usr/man"}
|
||||
CONFIG_EICONCTRL_DEBUG=${CONFIG_EICONCTRL_DEBUG:-"n"}
|
||||
CONFIG_KERNELDIR=`eval echo ${CONFIG_KERNELDIR:-"/usr/src/linux"}`
|
||||
MANDATE=`grep CHECKIN eiconctrl.man.in | awk '{print $4}'`
|
||||
|
||||
ac_aux_dir=
|
||||
|
@ -575,7 +570,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
|
|||
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
|
||||
# ./install, which can be erroneously created by make from ./install.sh.
|
||||
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
|
||||
echo "configure:579: checking for a BSD compatible install" >&5
|
||||
echo "configure:574: checking for a BSD compatible install" >&5
|
||||
if test -z "$INSTALL"; then
|
||||
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
|
@ -630,7 +625,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
|
|||
# Extract the first word of "gcc", so it can be a program name with args.
|
||||
set dummy gcc; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:634: checking for $ac_word" >&5
|
||||
echo "configure:629: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -660,7 +655,7 @@ if test -z "$CC"; then
|
|||
# Extract the first word of "cc", so it can be a program name with args.
|
||||
set dummy cc; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:664: checking for $ac_word" >&5
|
||||
echo "configure:659: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -711,7 +706,7 @@ fi
|
|||
# Extract the first word of "cl", so it can be a program name with args.
|
||||
set dummy cl; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:715: checking for $ac_word" >&5
|
||||
echo "configure:710: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -743,7 +738,7 @@ fi
|
|||
fi
|
||||
|
||||
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
|
||||
echo "configure:747: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
|
||||
echo "configure:742: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
|
||||
|
||||
ac_ext=c
|
||||
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
||||
|
@ -754,12 +749,12 @@ cross_compiling=$ac_cv_prog_cc_cross
|
|||
|
||||
cat > conftest.$ac_ext << EOF
|
||||
|
||||
#line 758 "configure"
|
||||
#line 753 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
main(){return(0);}
|
||||
EOF
|
||||
if { (eval echo configure:763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
ac_cv_prog_cc_works=yes
|
||||
# If we can't run a trivial program, we are probably using a cross compiler.
|
||||
if (./conftest; exit) 2>/dev/null; then
|
||||
|
@ -785,12 +780,12 @@ if test $ac_cv_prog_cc_works = no; then
|
|||
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
|
||||
fi
|
||||
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
|
||||
echo "configure:789: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
|
||||
echo "configure:784: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
|
||||
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
|
||||
cross_compiling=$ac_cv_prog_cc_cross
|
||||
|
||||
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
|
||||
echo "configure:794: checking whether we are using GNU C" >&5
|
||||
echo "configure:789: checking whether we are using GNU C" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -799,7 +794,7 @@ else
|
|||
yes;
|
||||
#endif
|
||||
EOF
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||
ac_cv_prog_gcc=yes
|
||||
else
|
||||
ac_cv_prog_gcc=no
|
||||
|
@ -818,7 +813,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
|
|||
ac_save_CFLAGS="$CFLAGS"
|
||||
CFLAGS=
|
||||
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
|
||||
echo "configure:822: checking whether ${CC-cc} accepts -g" >&5
|
||||
echo "configure:817: checking whether ${CC-cc} accepts -g" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -851,7 +846,7 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking for newpad in -lncurses""... $ac_c" 1>&6
|
||||
echo "configure:855: checking for newpad in -lncurses" >&5
|
||||
echo "configure:850: checking for newpad in -lncurses" >&5
|
||||
ac_lib_var=`echo ncurses'_'newpad | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
|
@ -859,7 +854,7 @@ else
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lncurses $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 863 "configure"
|
||||
#line 858 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
|
@ -870,7 +865,7 @@ int main() {
|
|||
newpad()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
|
@ -896,7 +891,7 @@ EOF
|
|||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
echo $ac_n "checking for newpad in -lcurses""... $ac_c" 1>&6
|
||||
echo "configure:900: checking for newpad in -lcurses" >&5
|
||||
echo "configure:895: checking for newpad in -lcurses" >&5
|
||||
ac_lib_var=`echo curses'_'newpad | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
|
@ -904,7 +899,7 @@ else
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lcurses $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 908 "configure"
|
||||
#line 903 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
|
@ -915,7 +910,7 @@ int main() {
|
|||
newpad()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
|
@ -930,7 +925,7 @@ LIBS="$ac_save_LIBS"
|
|||
fi
|
||||
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
||||
echo "$ac_t""yes" 1>&6
|
||||
ac_tr_lib=HAVE_LIB`echo curses | sed -e 's/^a-zA-Z0-9_/_/g' \
|
||||
ac_tr_lib=HAVE_LIB`echo curses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
|
||||
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
|
||||
cat >> confdefs.h <<EOF
|
||||
#define $ac_tr_lib 1
|
||||
|
@ -940,14 +935,14 @@ EOF
|
|||
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
{ echo "configure: error: "Missing ncurses library"" 1>&2; exit 1; }
|
||||
{ echo "configure: error: Missing ncurses library" 1>&2; exit 1; }
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
|
||||
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
|
||||
echo "configure:951: checking how to run the C preprocessor" >&5
|
||||
echo "configure:946: checking how to run the C preprocessor" >&5
|
||||
# On Suns, sometimes $CPP names a directory.
|
||||
if test -n "$CPP" && test -d "$CPP"; then
|
||||
CPP=
|
||||
|
@ -962,13 +957,13 @@ else
|
|||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||
# not just through cpp.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 966 "configure"
|
||||
#line 961 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:972: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:967: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
|
@ -979,13 +974,13 @@ else
|
|||
rm -rf conftest*
|
||||
CPP="${CC-cc} -E -traditional-cpp"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 983 "configure"
|
||||
#line 978 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:984: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
|
@ -996,13 +991,13 @@ else
|
|||
rm -rf conftest*
|
||||
CPP="${CC-cc} -nologo -E"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1000 "configure"
|
||||
#line 995 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:1001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
|
@ -1027,12 +1022,12 @@ fi
|
|||
echo "$ac_t""$CPP" 1>&6
|
||||
|
||||
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
|
||||
echo "configure:1031: checking for ANSI C header files" >&5
|
||||
echo "configure:1026: checking for ANSI C header files" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1036 "configure"
|
||||
#line 1031 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
@ -1040,7 +1035,7 @@ else
|
|||
#include <float.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1044: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:1039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -1057,7 +1052,7 @@ rm -f conftest*
|
|||
if test $ac_cv_header_stdc = yes; then
|
||||
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1061 "configure"
|
||||
#line 1056 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <string.h>
|
||||
EOF
|
||||
|
@ -1075,7 +1070,7 @@ fi
|
|||
if test $ac_cv_header_stdc = yes; then
|
||||
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1079 "configure"
|
||||
#line 1074 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdlib.h>
|
||||
EOF
|
||||
|
@ -1096,7 +1091,7 @@ if test "$cross_compiling" = yes; then
|
|||
:
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1100 "configure"
|
||||
#line 1095 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <ctype.h>
|
||||
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
|
||||
|
@ -1107,7 +1102,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
|
|||
exit (0); }
|
||||
|
||||
EOF
|
||||
if { (eval echo configure:1111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:1106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
:
|
||||
else
|
||||
|
@ -1134,17 +1129,17 @@ for ac_hdr in fcntl.h sys/ioctl.h unistd.h
|
|||
do
|
||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||
echo "configure:1138: checking for $ac_hdr" >&5
|
||||
echo "configure:1133: checking for $ac_hdr" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1143 "configure"
|
||||
#line 1138 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1148: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:1143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -1174,17 +1169,17 @@ for ac_hdr in ncurses.h
|
|||
do
|
||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||
echo "configure:1178: checking for $ac_hdr" >&5
|
||||
echo "configure:1173: checking for $ac_hdr" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1183 "configure"
|
||||
#line 1178 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:1183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -1211,17 +1206,17 @@ for ac_hdr in ncurses/curses.h
|
|||
do
|
||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||
echo "configure:1215: checking for $ac_hdr" >&5
|
||||
echo "configure:1210: checking for $ac_hdr" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1220 "configure"
|
||||
#line 1215 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:1220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -1248,17 +1243,17 @@ for ac_hdr in curses/ncurses.h
|
|||
do
|
||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||
echo "configure:1252: checking for $ac_hdr" >&5
|
||||
echo "configure:1247: checking for $ac_hdr" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1257 "configure"
|
||||
#line 1252 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:1257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -1285,17 +1280,17 @@ for ac_hdr in curses.h
|
|||
do
|
||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||
echo "configure:1289: checking for $ac_hdr" >&5
|
||||
echo "configure:1284: checking for $ac_hdr" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1294 "configure"
|
||||
#line 1289 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:1294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -1318,7 +1313,7 @@ EOF
|
|||
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
{ echo "configure: error: "Missing \(n\)curses.h"" 1>&2; exit 1; }
|
||||
{ echo "configure: error: Missing \(n\)curses.h" 1>&2; exit 1; }
|
||||
fi
|
||||
done
|
||||
|
||||
|
@ -1332,284 +1327,15 @@ fi
|
|||
done
|
||||
|
||||
|
||||
|
||||
OLD_CPPFLAGS="$CPPFLAGS"
|
||||
lxdir="no"
|
||||
eval tst_kerneldir=$CONFIG_KERNELDIR
|
||||
|
||||
# Check whether --with-kernel or --without-kernel was given.
|
||||
if test "${with_kernel+set}" = set; then
|
||||
withval="$with_kernel"
|
||||
DOTEST="y"; tst_kerneldir="${withval}"
|
||||
fi
|
||||
|
||||
|
||||
if test "$DOTEST" = "y" || test "$CONFIG_KERNELDIR" != "" ; then
|
||||
echo $ac_n "checking for linux kernel source in ${tst_kerneldir}""... $ac_c" 1>&6
|
||||
echo "configure:1350: checking for linux kernel source in ${tst_kerneldir}" >&5
|
||||
CPPFLAGS="-nostdinc -I${tst_kerneldir}/include -I${tst_kerneldir}/drivers/isdn"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1353 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <isdn_common.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
lxdir=${tst_kerneldir}
|
||||
else
|
||||
echo "$ac_err" >&5
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
rm -rf conftest*
|
||||
echo "$ac_t"""no"" 1>&6
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
if test "$lxdir" = "no" ; then
|
||||
echo $ac_n "checking for linux kernel source in /usr/src/linux""... $ac_c" 1>&6
|
||||
echo "configure:1374: checking for linux kernel source in /usr/src/linux" >&5
|
||||
CPPFLAGS="-nostdinc -I/usr/src/linux/include -I/usr/src/linux/drivers/isdn"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1377 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <isdn_common.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1382: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
lxdir=/usr/src/linux
|
||||
else
|
||||
echo "$ac_err" >&5
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
if test "$lxdir" = "no" ; then
|
||||
echo "$ac_t"""$lxdir"" 1>&6
|
||||
echo $ac_n "checking for linux kernel source in /usr/local/src/linux""... $ac_c" 1>&6
|
||||
echo "configure:1397: checking for linux kernel source in /usr/local/src/linux" >&5
|
||||
CPPFLAGS="-nostdinc -I/usr/local/src/linux/include -I/usr/local/src/linux/drivers/isdn"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1400 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <isdn_common.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1405: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
lxdir=/usr/local/src/linux
|
||||
else
|
||||
echo "$ac_err" >&5
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
if test "$lxdir" != "no" ; then
|
||||
echo "$ac_t"""yes"" 1>&6
|
||||
else
|
||||
lxdir=""
|
||||
{ echo "configure: error: "Kernel source not found. You MUST specify a correct path to the linux source in the configuration."" 1>&2; exit 1; }
|
||||
fi
|
||||
CONFIG_KERNELDIR="$lxdir"
|
||||
CPPFLAGS="$OLD_CPPFLAGS"
|
||||
cat >> confdefs.h <<EOF
|
||||
#define CONFIG_KERNELDIR "$lxdir"
|
||||
EOF
|
||||
|
||||
|
||||
|
||||
ac_safe=`echo "$CONFIG_KERNELDIR/include/linux/isdn.h" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for $CONFIG_KERNELDIR/include/linux/isdn.h""... $ac_c" 1>&6
|
||||
echo "configure:1433: checking for $CONFIG_KERNELDIR/include/linux/isdn.h" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1438 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$CONFIG_KERNELDIR/include/linux/isdn.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1443: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_header_$ac_safe=yes"
|
||||
else
|
||||
echo "$ac_err" >&5
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_header_$ac_safe=no"
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
|
||||
echo "$ac_t""yes" 1>&6
|
||||
:
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
{ echo "configure: error: "$CONFIG_KERNELDIR/include/linux/isdn.h missing. Kernel installed?"" 1>&2; exit 1; }
|
||||
|
||||
fi
|
||||
|
||||
ac_safe=`echo "$CONFIG_KERNELDIR/drivers/isdn/eicon/eicon.h" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for $CONFIG_KERNELDIR/drivers/isdn/eicon/eicon.h""... $ac_c" 1>&6
|
||||
echo "configure:1468: checking for $CONFIG_KERNELDIR/drivers/isdn/eicon/eicon.h" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1473 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$CONFIG_KERNELDIR/drivers/isdn/eicon/eicon.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_header_$ac_safe=yes"
|
||||
else
|
||||
echo "$ac_err" >&5
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_header_$ac_safe=no"
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
|
||||
echo "$ac_t""yes" 1>&6
|
||||
:
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
{ echo "configure: error: "$CONFIG_KERNELDIR/drivers/isdn/eicon/eicon.h missing. Kernel installed?"" 1>&2; exit 1; }
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
OLD_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="-nostdinc -I${CONFIG_KERNELDIR} -I/usr/include"
|
||||
have_xlog="no"
|
||||
echo $ac_n "checking for XLOG in ${CONFIG_KERNELDIR}/drivers/isdn/eicon/eicon.h""... $ac_c" 1>&6
|
||||
echo "configure:1507: checking for XLOG in ${CONFIG_KERNELDIR}/drivers/isdn/eicon/eicon.h" >&5
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1509 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <linux/types.h>
|
||||
#include <drivers/isdn/eicon/eicon.h>
|
||||
int main() {
|
||||
int x = XLOG_OK;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1517: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
have_xlog="yes"
|
||||
else
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
fi
|
||||
rm -f conftest*
|
||||
echo "$ac_t"""${have_xlog}"" 1>&6
|
||||
CPPFLAGS="$OLD_CPPFLAGS"
|
||||
if test "$have_xlog" != "no" ; then
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define HAVE_XLOG 1
|
||||
EOF
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
OLD_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="-nostdinc -I${CONFIG_KERNELDIR} -I/usr/include"
|
||||
have_npci="no"
|
||||
HAVE_NATIVE="n"
|
||||
echo $ac_n "checking for pci code in ${CONFIG_KERNELDIR}/drivers/isdn/eicon/eicon.h""... $ac_c" 1>&6
|
||||
echo "configure:1541: checking for pci code in ${CONFIG_KERNELDIR}/drivers/isdn/eicon/eicon.h" >&5
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1543 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <linux/types.h>
|
||||
#include <drivers/isdn/eicon/eicon.h>
|
||||
int main() {
|
||||
eicon_pci_codebuf *p = NULL;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1551: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
have_npci="yes"
|
||||
else
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
fi
|
||||
rm -f conftest*
|
||||
echo "$ac_t"""${have_npci}"" 1>&6
|
||||
CPPFLAGS="$OLD_CPPFLAGS"
|
||||
if test "$have_npci" != "no" ; then
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define HAVE_NPCI 1
|
||||
EOF
|
||||
|
||||
HAVE_NATIVE="y"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
OLD_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="-nostdinc -I${CONFIG_KERNELDIR} -I/usr/include"
|
||||
have_trace="no"
|
||||
echo $ac_n "checking for TRACE in ${CONFIG_KERNELDIR}/drivers/isdn/eicon/eicon.h""... $ac_c" 1>&6
|
||||
echo "configure:1576: checking for TRACE in ${CONFIG_KERNELDIR}/drivers/isdn/eicon/eicon.h" >&5
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1578 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <linux/types.h>
|
||||
#include <drivers/isdn/eicon/eicon.h>
|
||||
int main() {
|
||||
int x = TRACE_OK;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
have_trace="yes"
|
||||
else
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
fi
|
||||
rm -f conftest*
|
||||
echo "$ac_t"""${have_trace}"" 1>&6
|
||||
CPPFLAGS="$OLD_CPPFLAGS"
|
||||
if test "$have_trace" != "no" ; then
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define HAVE_TRACE 1
|
||||
EOF
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if test $ac_cv_prog_gcc = yes; then
|
||||
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
|
||||
echo "configure:1607: checking whether ${CC-cc} needs -traditional" >&5
|
||||
echo "configure:1333: checking whether ${CC-cc} needs -traditional" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
ac_pattern="Autoconf.*'x'"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1613 "configure"
|
||||
#line 1339 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sgtty.h>
|
||||
Autoconf TIOCGETP
|
||||
|
@ -1627,7 +1353,7 @@ rm -f conftest*
|
|||
|
||||
if test $ac_cv_prog_gcc_traditional = no; then
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1631 "configure"
|
||||
#line 1357 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <termio.h>
|
||||
Autoconf TCGETA
|
||||
|
@ -1652,17 +1378,17 @@ for ac_hdr in unistd.h
|
|||
do
|
||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||
echo "configure:1656: checking for $ac_hdr" >&5
|
||||
echo "configure:1382: checking for $ac_hdr" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1661 "configure"
|
||||
#line 1387 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:1392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -1691,12 +1417,12 @@ done
|
|||
for ac_func in getpagesize
|
||||
do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
echo "configure:1695: checking for $ac_func" >&5
|
||||
echo "configure:1421: checking for $ac_func" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1700 "configure"
|
||||
#line 1426 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
|
@ -1719,7 +1445,7 @@ $ac_func();
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:1449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_$ac_func=yes"
|
||||
else
|
||||
|
@ -1744,7 +1470,7 @@ fi
|
|||
done
|
||||
|
||||
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
|
||||
echo "configure:1748: checking for working mmap" >&5
|
||||
echo "configure:1474: checking for working mmap" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -1752,7 +1478,7 @@ else
|
|||
ac_cv_func_mmap_fixed_mapped=no
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1756 "configure"
|
||||
#line 1482 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
/* Thanks to Mike Haertel and Jim Avera for this test.
|
||||
|
@ -1892,7 +1618,7 @@ main()
|
|||
}
|
||||
|
||||
EOF
|
||||
if { (eval echo configure:1896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:1622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
ac_cv_func_mmap_fixed_mapped=yes
|
||||
else
|
||||
|
@ -1948,17 +1674,6 @@ EOF
|
|||
fi
|
||||
|
||||
|
||||
# Check whether --with-kernel or --without-kernel was given.
|
||||
if test "${with_kernel+set}" = set; then
|
||||
withval="$with_kernel"
|
||||
CONFIG_KERNELDIR="${withval}"
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define CONFIG_KERNELDIR "${withval}"
|
||||
EOF
|
||||
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --enable-dump or --disable-dump was given.
|
||||
if test "${enable_dump+set}" = set; then
|
||||
enableval="$enable_dump"
|
||||
|
@ -1967,6 +1682,23 @@ if test "${enable_dump+set}" = set; then
|
|||
fi
|
||||
|
||||
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define HAVE_XLOG 1
|
||||
EOF
|
||||
|
||||
|
||||
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define HAVE_TRACE 1
|
||||
EOF
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
HAVE_NATIVE="n"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -2114,15 +1846,15 @@ s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
|
|||
s%@INSTALL_DATA@%$INSTALL_DATA%g
|
||||
s%@CC@%$CC%g
|
||||
s%@CPP@%$CPP%g
|
||||
s%@CONFIG_KERNELDIR@%$CONFIG_KERNELDIR%g
|
||||
s%@HAVE_XLOG@%$HAVE_XLOG%g
|
||||
s%@HAVE_TRACE@%$HAVE_TRACE%g
|
||||
s%@HAVE_NPCI@%$HAVE_NPCI%g
|
||||
s%@HAVE_NATIVE@%$HAVE_NATIVE%g
|
||||
s%@HAVE_TRACE@%$HAVE_TRACE%g
|
||||
s%@INSTALL@%$INSTALL%g
|
||||
s%@MANDATE@%$MANDATE%g
|
||||
s%@CONFIG_EICONCTRL_DEBUG@%$CONFIG_EICONCTRL_DEBUG%g
|
||||
s%@CONFIG_DATADIR@%$CONFIG_DATADIR%g
|
||||
s%@CONFIG_KERNELDIR@%$CONFIG_KERNELDIR%g
|
||||
s%@CONFIG_SBINDIR@%$CONFIG_SBINDIR%g
|
||||
s%@CONFIG_MANDIR@%$CONFIG_MANDIR%g
|
||||
s%@I4LVERSION@%$I4LVERSION%g
|
||||
|
|
|
@ -7,7 +7,6 @@ CONFIG_DATADIR=${CONFIG_DATADIR:-"/usr/lib/isdn/eicon"}
|
|||
CONFIG_SBINDIR=${CONFIG_SBINDIR:-"/sbin"}
|
||||
CONFIG_MANDIR=${CONFIG_MANDIR:-"/usr/man"}
|
||||
CONFIG_EICONCTRL_DEBUG=${CONFIG_EICONCTRL_DEBUG:-"n"}
|
||||
CONFIG_KERNELDIR=`eval echo ${CONFIG_KERNELDIR:-"/usr/src/linux"}`
|
||||
MANDATE=`grep CHECKIN eiconctrl.man.in | awk '{print $4}'`
|
||||
|
||||
dnl Checks for programs.
|
||||
|
@ -28,21 +27,6 @@ AC_CHECK_HEADERS(ncurses.h,,
|
|||
[AC_CHECK_HEADERS(curses.h,,
|
||||
[AC_MSG_ERROR([Missing \(n\)curses.h])])])])])
|
||||
|
||||
dnl Find current kernel source
|
||||
AC_FIND_KERNEL
|
||||
AC_CHECK_HEADER(linux/isdn.h,,
|
||||
[AC_CHECK_HEADER($CONFIG_KERNELDIR/include/linux/isdn.h,,
|
||||
[AC_MSG_ERROR([$CONFIG_KERNELDIR/include/linux/isdn.h missing. Kernel installed?])]
|
||||
)])
|
||||
AC_CHECK_HEADER($CONFIG_KERNELDIR/drivers/isdn/eicon/eicon.h,,
|
||||
[AC_MSG_ERROR([$CONFIG_KERNELDIR/drivers/isdn/eicon/eicon.h missing. Kernel installed?])]
|
||||
)
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_CHECK_XLOG
|
||||
AC_CHECK_NPCI
|
||||
AC_CHECK_TRACE
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_PROG_GCC_TRADITIONAL
|
||||
AC_FUNC_MMAP
|
||||
|
@ -68,19 +52,23 @@ AC_ARG_WITH(man,
|
|||
AC_DEFINE(CONFIG_MANDIR,"${withval}"),
|
||||
)
|
||||
|
||||
dnl Optional kernel directory
|
||||
AC_ARG_WITH(kernel,
|
||||
[ --with-kernel=DIR Set kernel dir. [/usr/src/linux]],
|
||||
CONFIG_KERNELDIR="${withval}"
|
||||
AC_DEFINE(CONFIG_KERNELDIR,"${withval}"),
|
||||
)
|
||||
|
||||
dnl Check, if user wants dump option for debugging
|
||||
AC_ARG_ENABLE(dump,
|
||||
[ --enable-dump Enable dump feature for debugging [no]],
|
||||
CONFIG_EICONCTRL_DEBUG="y"
|
||||
)
|
||||
|
||||
AC_DEFINE(HAVE_XLOG)
|
||||
AC_SUBST(HAVE_XLOG)
|
||||
|
||||
AC_DEFINE(HAVE_TRACE)
|
||||
AC_SUBST(HAVE_TRACE)
|
||||
|
||||
AC_SUBST(HAVE_NPCI)
|
||||
|
||||
HAVE_NATIVE="n"
|
||||
AC_SUBST(HAVE_NATIVE)
|
||||
|
||||
AC_SUBST(INSTALL)
|
||||
AC_SUBST(MANDATE)
|
||||
AC_SUBST(CONFIG_EICONCTRL_DEBUG)
|
||||
|
|
|
@ -0,0 +1,161 @@
|
|||
/*
|
||||
* Copyright (C) Eicon Technology Corporation, 2000.
|
||||
*
|
||||
* Eicon File Revision : 1.0
|
||||
*
|
||||
* This software may be used and distributed according to the terms
|
||||
* of the GNU General Public License, incorporated herein by reference.
|
||||
*
|
||||
*/
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
/* Q.931 information elements maximum length */
|
||||
/* excluding the identifier, including the length field */
|
||||
/*------------------------------------------------------------------*/
|
||||
|
||||
#define MAX_LEN_BC 13
|
||||
#define MAX_LEN_LLC 19 /* ctr3 */
|
||||
#define MAX_LEN_HLC 6 /* ctr3 */
|
||||
#define MAX_LEN_UUI 200 /* Hicom USBS req */
|
||||
#define MAX_LEN_NUM 24
|
||||
#define MAX_LEN_DSP 83 /* ctr3 */
|
||||
#define MAX_LEN_NI 4
|
||||
#define MAX_LEN_PI 5
|
||||
#define MAX_LEN_SIN 3
|
||||
#define MAX_LEN_CST 4
|
||||
#define MAX_LEN_SIG 2
|
||||
#define MAX_LEN_SPID 32
|
||||
#define MAX_LEN_EID 3
|
||||
#define MAX_LEN_CHI 35 /* ctr3 */
|
||||
#define MAX_LEN_CAU 33
|
||||
#define MAX_LEN_FTY 130
|
||||
#define MAX_LEN_KEY 83 /* ctr3 */
|
||||
#define MAX_LEN_RSI 4
|
||||
#define MAX_LEN_CAI 11
|
||||
#define MAX_NUM_SPID 4
|
||||
#define MAX_LEN_USERID 9
|
||||
#define MAX_LEN_APPLID 5
|
||||
#define MAX_LEN_NTTCIF 15
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
/* decision return values */
|
||||
/*------------------------------------------------------------------*/
|
||||
|
||||
#define YES 1
|
||||
#define NO 0
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------*/
|
||||
/* w element coding */
|
||||
/*-------------------------------------------------------------------*/
|
||||
|
||||
#define NTTCIF 0x01
|
||||
#define BC 0x04
|
||||
#define CAU 0x08
|
||||
#define CAD 0x0c
|
||||
#define CAI 0x10
|
||||
#define CST 0x14
|
||||
#define CHI 0x18
|
||||
#define LLI 0x19
|
||||
#define CHA 0x1a
|
||||
#define FTY 0x1c
|
||||
#define PI 0x1e
|
||||
#define NFAC 0x20
|
||||
#define TC 0x24
|
||||
#define ATT_EID 0x26
|
||||
#define NI 0x27
|
||||
#define DSP 0x28
|
||||
#define DT 0x29
|
||||
#define KEY 0x2c
|
||||
#define KP 0x2c
|
||||
#define UID 0x2d
|
||||
#define SIG 0x34
|
||||
#define FI 0x39
|
||||
#define SPID 0x3a
|
||||
#define EID 0x3b
|
||||
#define DSPF 0x3c
|
||||
#define ECAD 0x4c
|
||||
#define OAD 0x6c
|
||||
#define OSA 0x6d
|
||||
#define DAD 0x70
|
||||
#define CPN 0x70
|
||||
#define DSA 0x71
|
||||
#define RDX 0x73
|
||||
#define RAD 0x74
|
||||
#define RDN 0x74
|
||||
#define RSI 0x79
|
||||
#define SCR 0x7A /* internal unscreened CPN */
|
||||
#define MIE 0x7a /* internal management info element */
|
||||
#define LLC 0x7c
|
||||
#define HLC 0x7d
|
||||
#define UUI 0x7e
|
||||
#define ESC 0x7f
|
||||
|
||||
#define SHIFT 0x90
|
||||
#define MORE 0xa0
|
||||
#define CL 0xb0
|
||||
|
||||
/* information elements used on the spid interface */
|
||||
#define SPID_CMD 0xc0
|
||||
#define SPID_LINK 0x10
|
||||
#define SPID_DN 0x70
|
||||
#define SPID_BC 0x04
|
||||
#define SPID_SWITCH 0x11
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
/* global configuration parameters, defined in exec.c */
|
||||
/* these parameters are configured with program loading */
|
||||
/*------------------------------------------------------------------*/
|
||||
|
||||
#define PROT_1TR6 0
|
||||
#define PROT_ETSI 1
|
||||
#define PROT_FRANC 2
|
||||
#define PROT_BELG 3
|
||||
#define PROT_SWED 4
|
||||
#define PROT_NI 5
|
||||
#define PROT_5ESS 6
|
||||
#define PROT_JAPAN 7
|
||||
#define PROT_ATEL 8
|
||||
#define PROT_US 9
|
||||
#define PROT_ITALY 10
|
||||
#define PROT_TWAN 11
|
||||
#define PROT_AUSTRAL 12
|
||||
|
||||
#define INIT_PROT_1TR6 0x80|PROT_1TR6
|
||||
#define INIT_PROT_ETSI 0x80|PROT_ETSI
|
||||
#define INIT_PROT_FRANC 0x80|PROT_FRANC
|
||||
#define INIT_PROT_BELG 0x80|PROT_BELG
|
||||
#define INIT_PROT_SWED 0x80|PROT_SWED
|
||||
#define INIT_PROT_NI 0x80|PROT_NI
|
||||
#define INIT_PROT_5ESS 0x80|PROT_5ESS
|
||||
#define INIT_PROT_JAPAN 0x80|PROT_JAPAN
|
||||
#define INIT_PROT_ATEL 0x80|PROT_ATEL
|
||||
#define INIT_PROT_ITALY 0x80|PROT_ITALY
|
||||
#define INIT_PROT_TWAN 0x80|PROT_TWAN
|
||||
#define INIT_PROT_AUSTRAL 0x80|PROT_AUSTRAL
|
||||
|
||||
|
||||
/* -----------------------------------------------------------**
|
||||
** The PROTOCOL_FEATURE_STRING in feature.h (included **
|
||||
** in prstart.sx and astart.sx) defines capabilities and **
|
||||
** features of the actual protocol code. It's used as a bit **
|
||||
** mask. **
|
||||
** The following Bits are defined: **
|
||||
** -----------------------------------------------------------*/
|
||||
|
||||
#define PROTCAP_TELINDUS 0x0001 /* Telindus Variant of protocol code */
|
||||
#define PROTCAP_MANIF 0x0002 /* Management interface implemented */
|
||||
#define PROTCAP_V_42 0x0004 /* V42 implemented */
|
||||
#define PROTCAP_V90D 0x0008 /* V.90D (implies up to 384k DSP code) */
|
||||
#define PROTCAP_EXTD_FAX 0x0010 /* Extended FAX (ECM, 2D, T6, Polling) */
|
||||
#define PROTCAP_FREE4 0x0020 /* not used */
|
||||
#define PROTCAP_FREE5 0x0040 /* not used */
|
||||
#define PROTCAP_FREE6 0x0080 /* not used */
|
||||
#define PROTCAP_FREE7 0x0100 /* not used */
|
||||
#define PROTCAP_FREE8 0x0200 /* not used */
|
||||
#define PROTCAP_FREE9 0x0400 /* not used */
|
||||
#define PROTCAP_FREE10 0x0800 /* not used */
|
||||
#define PROTCAP_FREE11 0x1000 /* not used */
|
||||
#define PROTCAP_FREE12 0x2000 /* not used */
|
||||
#define PROTCAP_FREE13 0x4000 /* not used */
|
||||
#define PROTCAP_EXTENSION 0x8000 /* used for future extentions */
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* Include file for defining the kernel loggger messages
|
||||
* These definitions are shared between the klog driver and the
|
||||
* klogd daemon process
|
||||
*
|
||||
* Copyright (C) Eicon Technology Corporation, 2000.
|
||||
*
|
||||
* Eicon File Revision : 1.0
|
||||
*
|
||||
* This software may be used and distributed according to the terms
|
||||
* of the GNU General Public License, incorporated herein by reference.
|
||||
*
|
||||
*/
|
||||
|
||||
#if !defined(_KLOGMSG_H)
|
||||
#define _KLOGMSG_H
|
||||
|
||||
/* define a type for a log entry */
|
||||
|
||||
#define KLOG_TEXT_MSG (0)
|
||||
#define KLOG_XLOG_MSG (1)
|
||||
#define KLOG_XTXT_MSG (2)
|
||||
#define KLOG_IDI_REQ (4)
|
||||
#define KLOG_IDI_CALLBACK (5)
|
||||
#define KLOG_CAPI_MSG (6)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned long time_stamp; /* in ms since last system boot */
|
||||
int card; /* card number (-1 for all) */
|
||||
unsigned int type; /* type of log message (0 is text) */
|
||||
unsigned int length; /* message length (non-text messages only) */
|
||||
unsigned short code; /* message code (non-text messages only) */
|
||||
char buffer[110];/* text/data to log */
|
||||
} klog_t;
|
||||
|
||||
void DivasLogAdd(void *buffer, int length);
|
||||
#endif /* of _KLOGMSG_H */
|
|
@ -0,0 +1,215 @@
|
|||
/*
|
||||
* External Diva Server driver include file
|
||||
*
|
||||
* Copyright (C) Eicon Technology Corporation, 2000.
|
||||
*
|
||||
* Eicon File Revision : 1.5
|
||||
*
|
||||
* This software may be used and distributed according to the terms
|
||||
* of the GNU General Public License, incorporated herein by reference.
|
||||
*
|
||||
*/
|
||||
|
||||
#if !defined(DIVAS_H)
|
||||
#define DIVAS_H
|
||||
|
||||
#include "sys.h"
|
||||
|
||||
|
||||
/* IOCTL commands */
|
||||
|
||||
#define DIA_IOCTL_INIT (0)
|
||||
#define DIA_IOCTL_LOAD (1)
|
||||
#define DIA_IOCTL_CONFIG (2)
|
||||
#define DIA_IOCTL_START (3)
|
||||
#define DIA_IOCTL_GET_NUM (4)
|
||||
#define DIA_IOCTL_GET_LIST (5)
|
||||
#define DIA_IOCTL_LOG (6)
|
||||
#define DIA_IOCTL_DETECT (7)
|
||||
#define DIA_IOCTL_SPACE (8)
|
||||
#define DIA_IOCTL_GET_MEM (9)
|
||||
#define DIA_IOCTL_FLAVOUR (10)
|
||||
#define DIA_IOCTL_XLOG_REQ (11)
|
||||
|
||||
/* Error codes */
|
||||
|
||||
#define XLOG_ERR_CARD_NUM (13)
|
||||
#define XLOG_ERR_DONE (14)
|
||||
#define XLOG_ERR_CMD (15)
|
||||
#define XLOG_ERR_TIMEOUT (16)
|
||||
#define XLOG_ERR_CARD_STATE (17)
|
||||
#define XLOG_ERR_UNKNOWN (18)
|
||||
#define XLOG_OK (0)
|
||||
|
||||
/* Adapter states */
|
||||
|
||||
#define DIA_UNKNOWN (0)
|
||||
#define DIA_RESET (1)
|
||||
#define DIA_LOADED (2)
|
||||
#define DIA_CONFIGURED (3)
|
||||
#define DIA_RUNNING (4)
|
||||
|
||||
/* Stucture for getting card specific information from active cad driver */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int card_type;
|
||||
int card_slot;
|
||||
int state;
|
||||
} dia_card_list_t;
|
||||
|
||||
/* use following to select which logging to have active */
|
||||
|
||||
#define DIVAS_LOG_DEBUG (1 << 0)
|
||||
#define DIVAS_LOG_XLOG (1 << 1)
|
||||
#define DIVAS_LOG_IDI (1 << 2)
|
||||
#define DIVAS_LOG_CAPI (1 << 3)
|
||||
|
||||
/* stucture for DIA_IOCTL_LOG to get information from adapter */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int card_id;
|
||||
int log_types; /* bit mask of log types: use DIVAS_LOG_XXX */
|
||||
} dia_log_t;
|
||||
|
||||
/* list of cards supported by this driver */
|
||||
|
||||
#define DIA_CARD_TYPE_DIVA_SERVER (0) /* Diva Server PRI */
|
||||
#define DIA_CARD_TYPE_DIVA_SERVER_B (1) /* Diva Server BRI */
|
||||
#define DIA_CARD_TYPE_DIVA_SERVER_Q (2) /* Diva Server 4-BRI */
|
||||
|
||||
/* bus types */
|
||||
|
||||
#define DIA_BUS_TYPE_ISA (0)
|
||||
#define DIA_BUS_TYPE_ISA_PNP (1)
|
||||
#define DIA_BUS_TYPE_PCI (2)
|
||||
#define DIA_BUS_TYPE_MCA (3)
|
||||
|
||||
/* types of memory used (index for memory array below) */
|
||||
|
||||
#define DIVAS_RAM_MEMORY 0
|
||||
#define DIVAS_REG_MEMORY 1
|
||||
#define DIVAS_CFG_MEMORY 2
|
||||
#define DIVAS_SHARED_MEMORY 3
|
||||
#define DIVAS_CTL_MEMORY 4
|
||||
/*
|
||||
* card config information
|
||||
* passed as parameter to DIA_IOCTL_INIT ioctl to initialise new card
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int card_id; /* unique id assigned to this card */
|
||||
int card_type; /* use DIA_CARD_TYPE_xxx above */
|
||||
int bus_type; /* use DIA_BUS_TYPE_xxx above */
|
||||
int bus_num; /* bus number (instance number of bus type) */
|
||||
int func_num; /* adapter function number (PCI register) */
|
||||
int slot; /* slot number in bus */
|
||||
unsigned char irq; /* IRQ number */
|
||||
int reset_base; /* Reset register for I/O mapped cards */
|
||||
int io_base; /* I/O base for I/O mapped cards */
|
||||
void *memory[5]; /* memory base addresses for memory mapped cards */
|
||||
char name[9]; /* name of adapter */
|
||||
int serial; /* serial number */
|
||||
unsigned char int_priority; /* Interrupt priority */
|
||||
} dia_card_t;
|
||||
|
||||
/*
|
||||
* protocol configuration information
|
||||
* passed as parameter to DIA_IOCTL_CONFIG ioctl to configure card
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int card_id; /* to identify particular card */
|
||||
unsigned char tei;
|
||||
unsigned char nt2;
|
||||
unsigned char watchdog;
|
||||
unsigned char permanent;
|
||||
unsigned char x_interface;
|
||||
unsigned char stable_l2;
|
||||
unsigned char no_order_check;
|
||||
unsigned char handset_type;
|
||||
unsigned char sig_flags;
|
||||
unsigned char low_channel;
|
||||
unsigned char prot_version;
|
||||
unsigned char crc4;
|
||||
struct
|
||||
{
|
||||
unsigned char oad[32];
|
||||
unsigned char osa[32];
|
||||
unsigned char spid[32];
|
||||
}terminal[2];
|
||||
} dia_config_t;
|
||||
|
||||
/*
|
||||
* code configuration
|
||||
* passed as parameter to DIA_IOCTL_LOAD ioctl
|
||||
* one of these ioctl per code file to load
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int card_id; /* card to load */
|
||||
enum
|
||||
{
|
||||
DIA_CPU_CODE, /* CPU code */
|
||||
DIA_DSP_CODE, /* DSP code */
|
||||
DIA_CONT_CODE, /* continuation of code */
|
||||
DIA_TABLE_CODE, /* code table */
|
||||
DIA_DLOAD_CNT, /* number of downloads*/
|
||||
DIA_FPGA_CODE
|
||||
} code_type; /* code for CPU or DSP ? */
|
||||
int length; /* length of code */
|
||||
unsigned char *code; /* pointer (in user-space) to code */
|
||||
} dia_load_t;
|
||||
|
||||
/*
|
||||
* start configuration
|
||||
* passed as parameter to DIA_IOCTL_START ioctl
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int card_id; /* card to start */
|
||||
} dia_start_t;
|
||||
|
||||
/* used for retrieving memory from the card */
|
||||
|
||||
typedef struct {
|
||||
word card_id;
|
||||
dword addr;
|
||||
byte data[16 * 8];
|
||||
} mem_block_t;
|
||||
|
||||
/* DIVA Server specific addresses */
|
||||
|
||||
#define DIVAS_CPU_START_ADDR (0x0)
|
||||
#define ORG_MAX_PROTOCOL_CODE_SIZE 0x000A0000
|
||||
#define ORG_MAX_DSP_CODE_SIZE (0x000F0000 - ORG_MAX_PROTOCOL_CODE_SIZE)
|
||||
#define ORG_DSP_CODE_BASE (0xBF7F0000 - ORG_MAX_DSP_CODE_SIZE)
|
||||
#define DIVAS_DSP_START_ADDR (0xBF7A0000)
|
||||
#define DIVAS_SHARED_OFFSET (0x1000)
|
||||
#define MP_DSP_CODE_BASE 0xa03a0000
|
||||
#define MQ_PROTCODE_OFFSET 0x100000
|
||||
#define MQ_SM_OFFSET 0X0f0000
|
||||
|
||||
#define V90D_MAX_PROTOCOL_CODE_SIZE 0x00090000
|
||||
#define V90D_MAX_DSP_CODE_SIZE (0x000F0000 - V90D_MAX_PROTOCOL_CODE_SIZE)
|
||||
#define V90D_DSP_CODE_BASE (0xBF7F0000 - V90D_MAX_DSP_CODE_SIZE)
|
||||
|
||||
#define MQ_ORG_MAX_PROTOCOL_CODE_SIZE 0x000a0000 /* max 640K Protocol-Code */
|
||||
#define MQ_ORG_MAX_DSP_CODE_SIZE 0x00050000 /* max 320K DSP-Code */
|
||||
#define MQ_ORG_DSP_CODE_BASE (MQ_MAX_DSP_DOWNLOAD_ADDR \
|
||||
- MQ_ORG_MAX_DSP_CODE_SIZE)
|
||||
#define MQ_V90D_MAX_PROTOCOL_CODE_SIZE 0x00090000 /* max 576K Protocol-Code */
|
||||
#define MQ_V90D_MAX_DSP_CODE_SIZE 0x00060000 /* max 384K DSP-Code if V.90D included */
|
||||
#define MQ_MAX_DSP_DOWNLOAD_ADDR 0xa03f0000
|
||||
#define MQ_V90D_DSP_CODE_BASE (MQ_MAX_DSP_DOWNLOAD_ADDR \
|
||||
- MQ_V90D_MAX_DSP_CODE_SIZE)
|
||||
|
||||
|
||||
#define ALIGNMENT_MASK_MAESTRA 0xfffffffc
|
||||
|
||||
#endif /* DIVAS_H */
|
|
@ -0,0 +1,286 @@
|
|||
/*
|
||||
* Copyright (C) Eicon Technology Corporation, 2000.
|
||||
*
|
||||
* Eicon File Revision : 1.0
|
||||
*
|
||||
* This software may be used and distributed according to the terms
|
||||
* of the GNU General Public License, incorporated herein by reference.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef DSP_DEFS_H_
|
||||
#define DSP_DEFS_H_
|
||||
|
||||
#ifndef DSPDIDS_H_
|
||||
#include "dspdids.h"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
#ifndef TRUE
|
||||
#define TRUE (0 == 0)
|
||||
#endif
|
||||
#ifndef FALSE
|
||||
#define FALSE (0 != 0)
|
||||
#endif
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
#define DSP_MEMORY_TYPE_EXTERNAL_DM 0
|
||||
#define DSP_MEMORY_TYPE_EXTERNAL_PM 1
|
||||
#define DSP_MEMORY_TYPE_INTERNAL_DM 2
|
||||
#define DSP_MEMORY_TYPE_INTERNAL_PM 3
|
||||
|
||||
#define DSP_DOWNLOAD_FLAG_BOOTABLE 0x0001
|
||||
#define DSP_DOWNLOAD_FLAG_2181 0x0002
|
||||
#define DSP_DOWNLOAD_FLAG_TIMECRITICAL 0x0004
|
||||
#define DSP_DOWNLOAD_FLAG_COMPAND 0x0008
|
||||
|
||||
#define DSP_MEMORY_BLOCK_COUNT 16
|
||||
|
||||
#define DSP_SEGMENT_PM_FLAG 0x0001
|
||||
#define DSP_SEGMENT_SHARED_FLAG 0x0002
|
||||
|
||||
#define DSP_SEGMENT_EXTERNAL_DM DSP_MEMORY_TYPE_EXTERNAL_DM
|
||||
#define DSP_SEGMENT_EXTERNAL_PM DSP_MEMORY_TYPE_EXTERNAL_PM
|
||||
#define DSP_SEGMENT_INTERNAL_DM DSP_MEMORY_TYPE_INTERNAL_DM
|
||||
#define DSP_SEGMENT_INTERNAL_PM DSP_MEMORY_TYPE_INTERNAL_PM
|
||||
#define DSP_SEGMENT_FIRST_RELOCATABLE 4
|
||||
|
||||
#define DSP_DATA_BLOCK_PM_FLAG 0x0001
|
||||
#define DSP_DATA_BLOCK_DWORD_FLAG 0x0002
|
||||
#define DSP_DATA_BLOCK_RESOLVE_FLAG 0x0004
|
||||
|
||||
#define DSP_RELOC_NONE 0x00
|
||||
#define DSP_RELOC_SEGMENT_MASK 0x3f
|
||||
#define DSP_RELOC_TYPE_MASK 0xc0
|
||||
#define DSP_RELOC_TYPE_0 0x00 /* relocation of address in DM word / high part of PM word */
|
||||
#define DSP_RELOC_TYPE_1 0x40 /* relocation of address in low part of PM data word */
|
||||
#define DSP_RELOC_TYPE_2 0x80 /* relocation of address in standard command */
|
||||
#define DSP_RELOC_TYPE_3 0xc0 /* relocation of address in call/jump on flag in */
|
||||
|
||||
#define DSP_COMBIFILE_FORMAT_IDENTIFICATION_SIZE 48
|
||||
#define DSP_COMBIFILE_FORMAT_VERSION_BCD 0x0100
|
||||
|
||||
#define DSP_FILE_FORMAT_IDENTIFICATION_SIZE 48
|
||||
#define DSP_FILE_FORMAT_VERSION_BCD 0x0100
|
||||
|
||||
|
||||
typedef struct tag_dsp_combifile_header
|
||||
{
|
||||
char format_identification[DSP_COMBIFILE_FORMAT_IDENTIFICATION_SIZE];
|
||||
word format_version_bcd;
|
||||
word header_size;
|
||||
word combifile_description_size;
|
||||
word directory_entries;
|
||||
word directory_size;
|
||||
word download_count;
|
||||
word usage_mask_size;
|
||||
} t_dsp_combifile_header;
|
||||
|
||||
typedef struct tag_dsp_combifile_directory_entry
|
||||
{
|
||||
word card_type_number;
|
||||
word file_set_number;
|
||||
} t_dsp_combifile_directory_entry;
|
||||
|
||||
typedef struct tag_dsp_file_header
|
||||
{
|
||||
char format_identification[DSP_FILE_FORMAT_IDENTIFICATION_SIZE];
|
||||
word format_version_bcd;
|
||||
word download_id;
|
||||
word download_flags;
|
||||
word required_processing_power;
|
||||
word interface_channel_count;
|
||||
word header_size;
|
||||
word download_description_size;
|
||||
word memory_block_table_size;
|
||||
word memory_block_count;
|
||||
word segment_table_size;
|
||||
word segment_count;
|
||||
word symbol_table_size;
|
||||
word symbol_count;
|
||||
word total_data_size_dm;
|
||||
word data_block_count_dm;
|
||||
word total_data_size_pm;
|
||||
word data_block_count_pm;
|
||||
} t_dsp_file_header;
|
||||
|
||||
typedef struct tag_dsp_memory_block_desc
|
||||
{
|
||||
word alias_memory_block;
|
||||
word memory_type;
|
||||
word address;
|
||||
word size; /* DSP words */
|
||||
} t_dsp_memory_block_desc;
|
||||
|
||||
typedef struct tag_dsp_segment_desc
|
||||
{
|
||||
word memory_block;
|
||||
word attributes;
|
||||
word base;
|
||||
word size;
|
||||
word alignment; /* ==0 -> no other legal start address than base */
|
||||
} t_dsp_segment_desc;
|
||||
|
||||
typedef struct tag_dsp_symbol_desc
|
||||
{
|
||||
word symbol_id;
|
||||
word segment;
|
||||
word offset;
|
||||
word size; /* DSP words */
|
||||
} t_dsp_symbol_desc;
|
||||
|
||||
typedef struct tag_dsp_data_block_header
|
||||
{
|
||||
word attributes;
|
||||
word segment;
|
||||
word offset;
|
||||
word size; /* DSP words */
|
||||
} t_dsp_data_block_header;
|
||||
|
||||
typedef struct tag_dsp_download_desc /* be sure to keep native alignment for MAESTRA's */
|
||||
{
|
||||
word download_id;
|
||||
word download_flags;
|
||||
word required_processing_power;
|
||||
word interface_channel_count;
|
||||
word excess_header_size;
|
||||
word memory_block_count;
|
||||
word segment_count;
|
||||
word symbol_count;
|
||||
word data_block_count_dm;
|
||||
word data_block_count_pm;
|
||||
byte *p_excess_header_data;
|
||||
char *p_download_description;
|
||||
t_dsp_memory_block_desc *p_memory_block_table;
|
||||
t_dsp_segment_desc *p_segment_table;
|
||||
t_dsp_symbol_desc *p_symbol_table;
|
||||
word *p_data_blocks_dm;
|
||||
word *p_data_blocks_pm;
|
||||
} t_dsp_download_desc;
|
||||
|
||||
#define DSP_DOWNLOAD_INDEX_KERNEL 0
|
||||
#define DSP30TX_DOWNLOAD_INDEX_KERNEL 1
|
||||
#define DSP30RX_DOWNLOAD_INDEX_KERNEL 2
|
||||
#define DSP_MAX_DOWNLOAD_COUNT 35
|
||||
|
||||
|
||||
#define DSP_DOWNLOAD_MAX_SEGMENTS 16
|
||||
|
||||
#define DSP_UDATA_REQUEST_RECONFIGURE 0
|
||||
/*
|
||||
parameters:
|
||||
<word> reconfigure delay (in 8kHz samples)
|
||||
<word> reconfigure code
|
||||
<byte> reconfigure hdlc preamble flags
|
||||
*/
|
||||
|
||||
#define DSP_RECONFIGURE_TX_FLAG 0x8000
|
||||
#define DSP_RECONFIGURE_SHORT_TRAIN_FLAG 0x4000
|
||||
#define DSP_RECONFIGURE_ECHO_PROTECT_FLAG 0x2000
|
||||
#define DSP_RECONFIGURE_HDLC_FLAG 0x1000
|
||||
#define DSP_RECONFIGURE_SYNC_FLAG 0x0800
|
||||
#define DSP_RECONFIGURE_PROTOCOL_MASK 0x00ff
|
||||
#define DSP_RECONFIGURE_IDLE 0
|
||||
#define DSP_RECONFIGURE_V25 1
|
||||
#define DSP_RECONFIGURE_V21_CH2 2
|
||||
#define DSP_RECONFIGURE_V27_2400 3
|
||||
#define DSP_RECONFIGURE_V27_4800 4
|
||||
#define DSP_RECONFIGURE_V29_7200 5
|
||||
#define DSP_RECONFIGURE_V29_9600 6
|
||||
#define DSP_RECONFIGURE_V33_12000 7
|
||||
#define DSP_RECONFIGURE_V33_14400 8
|
||||
#define DSP_RECONFIGURE_V17_7200 9
|
||||
#define DSP_RECONFIGURE_V17_9600 10
|
||||
#define DSP_RECONFIGURE_V17_12000 11
|
||||
#define DSP_RECONFIGURE_V17_14400 12
|
||||
|
||||
/*
|
||||
data indications if transparent framer
|
||||
<byte> data 0
|
||||
<byte> data 1
|
||||
...
|
||||
|
||||
data indications if HDLC framer
|
||||
<byte> data 0
|
||||
<byte> data 1
|
||||
...
|
||||
<byte> CRC 0
|
||||
<byte> CRC 1
|
||||
<byte> preamble flags
|
||||
*/
|
||||
|
||||
#define DSP_UDATA_INDICATION_SYNC 0
|
||||
/*
|
||||
returns:
|
||||
<word> time of sync (sampled from counter at 8kHz)
|
||||
*/
|
||||
|
||||
#define DSP_UDATA_INDICATION_DCD_OFF 1
|
||||
/*
|
||||
returns:
|
||||
<word> time of DCD off (sampled from counter at 8kHz)
|
||||
*/
|
||||
|
||||
#define DSP_UDATA_INDICATION_DCD_ON 2
|
||||
/*
|
||||
returns:
|
||||
<word> time of DCD on (sampled from counter at 8kHz)
|
||||
<byte> connected norm
|
||||
<word> connected options
|
||||
<dword> connected speed (bit/s)
|
||||
*/
|
||||
|
||||
#define DSP_UDATA_INDICATION_CTS_OFF 3
|
||||
/*
|
||||
returns:
|
||||
<word> time of CTS off (sampled from counter at 8kHz)
|
||||
*/
|
||||
|
||||
#define DSP_UDATA_INDICATION_CTS_ON 4
|
||||
/*
|
||||
returns:
|
||||
<word> time of CTS on (sampled from counter at 8kHz)
|
||||
<byte> connected norm
|
||||
<word> connected options
|
||||
<dword> connected speed (bit/s)
|
||||
*/
|
||||
|
||||
#define DSP_CONNECTED_NORM_UNSPECIFIED 0
|
||||
#define DSP_CONNECTED_NORM_V21 1
|
||||
#define DSP_CONNECTED_NORM_V23 2
|
||||
#define DSP_CONNECTED_NORM_V22 3
|
||||
#define DSP_CONNECTED_NORM_V22_BIS 4
|
||||
#define DSP_CONNECTED_NORM_V32_BIS 5
|
||||
#define DSP_CONNECTED_NORM_V34 6
|
||||
#define DSP_CONNECTED_NORM_V8 7
|
||||
#define DSP_CONNECTED_NORM_BELL_212A 8
|
||||
#define DSP_CONNECTED_NORM_BELL_103 9
|
||||
#define DSP_CONNECTED_NORM_V29_LEASED_LINE 10
|
||||
#define DSP_CONNECTED_NORM_V33_LEASED_LINE 11
|
||||
#define DSP_CONNECTED_NORM_TFAST 12
|
||||
#define DSP_CONNECTED_NORM_V21_CH2 13
|
||||
#define DSP_CONNECTED_NORM_V27_TER 14
|
||||
#define DSP_CONNECTED_NORM_V29 15
|
||||
#define DSP_CONNECTED_NORM_V33 16
|
||||
#define DSP_CONNECTED_NORM_V17 17
|
||||
|
||||
#define DSP_CONNECTED_OPTION_TRELLIS 0x0001
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
|
@ -0,0 +1,67 @@
|
|||
/*
|
||||
* Copyright (C) Eicon Technology Corporation, 2000.
|
||||
*
|
||||
* Eicon File Revision : 1.0
|
||||
*
|
||||
* This software may be used and distributed according to the terms
|
||||
* of the GNU General Public License, incorporated herein by reference.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef DSPDIDS_H_
|
||||
#define DSPDIDS_H_
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
#define DSP_DID_INVALID 0
|
||||
#define DSP_DID_DIVA 1
|
||||
#define DSP_DID_DIVA_PRO 2
|
||||
#define DSP_DID_DIVA_PRO_20 3
|
||||
#define DSP_DID_DIVA_PRO_PCCARD 4
|
||||
#define DSP_DID_DIVA_SERVER_BRI_1M 5
|
||||
#define DSP_DID_DIVA_SERVER_BRI_2M 6
|
||||
#define DSP_DID_DIVA_SERVER_PRI_2M_TX 7
|
||||
#define DSP_DID_DIVA_SERVER_PRI_2M_RX 8
|
||||
#define DSP_DID_DIVA_SERVER_PRI_30M 9
|
||||
#define DSP_DID_TASK_HSCX 100
|
||||
#define DSP_DID_TASK_HSCX_PRI_2M_TX 101
|
||||
#define DSP_DID_TASK_HSCX_PRI_2M_RX 102
|
||||
#define DSP_DID_TASK_V110KRNL 200
|
||||
#define DSP_DID_OVERLAY_V1100 201
|
||||
#define DSP_DID_OVERLAY_V1101 202
|
||||
#define DSP_DID_OVERLAY_V1102 203
|
||||
#define DSP_DID_OVERLAY_V1103 204
|
||||
#define DSP_DID_OVERLAY_V1104 205
|
||||
#define DSP_DID_OVERLAY_V1105 206
|
||||
#define DSP_DID_OVERLAY_V1106 207
|
||||
#define DSP_DID_OVERLAY_V1107 208
|
||||
#define DSP_DID_OVERLAY_V1108 209
|
||||
#define DSP_DID_OVERLAY_V1109 210
|
||||
#define DSP_DID_TASK_V110_PRI_2M_TX 220
|
||||
#define DSP_DID_TASK_V110_PRI_2M_RX 221
|
||||
#define DSP_DID_TASK_MODEM 300
|
||||
#define DSP_DID_TASK_FAX05 400
|
||||
#define DSP_DID_TASK_VOICE 500
|
||||
#define DSP_DID_TASK_TIKRNL81 600
|
||||
#define DSP_DID_OVERLAY_DIAL 601
|
||||
#define DSP_DID_OVERLAY_V22 602
|
||||
#define DSP_DID_OVERLAY_V32 603
|
||||
#define DSP_DID_OVERLAY_FSK 604
|
||||
#define DSP_DID_OVERLAY_FAX 605
|
||||
#define DSP_DID_OVERLAY_VXX 606
|
||||
#define DSP_DID_OVERLAY_V8 607
|
||||
#define DSP_DID_OVERLAY_INFO 608
|
||||
#define DSP_DID_OVERLAY_V34 609
|
||||
#define DSP_DID_OVERLAY_DFX 610
|
||||
#define DSP_DID_PARTIAL_OVERLAY_DIAL 611
|
||||
#define DSP_DID_PARTIAL_OVERLAY_FSK 612
|
||||
#define DSP_DID_PARTIAL_OVERLAY_FAX 613
|
||||
#define DSP_DID_TASK_TIKRNL05 700
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
#endif
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
|
@ -0,0 +1,388 @@
|
|||
/* $Id: eicon.h,v 1.1 2002/07/19 18:42:02 armin Exp $
|
||||
*
|
||||
* ISDN low-level module for Eicon active ISDN-Cards.
|
||||
*
|
||||
* Copyright 1998 by Fritz Elfert (fritz@isdn4linux.de)
|
||||
* Copyright 1998-2000 by Armin Schindler (mac@melware.de)
|
||||
* Copyright 1999,2000 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 eicon_h
|
||||
#define eicon_h
|
||||
|
||||
#define EICON_IOCTL_SETMMIO 0
|
||||
#define EICON_IOCTL_GETMMIO 1
|
||||
#define EICON_IOCTL_SETIRQ 2
|
||||
#define EICON_IOCTL_GETIRQ 3
|
||||
#define EICON_IOCTL_LOADBOOT 4
|
||||
#define EICON_IOCTL_ADDCARD 5
|
||||
#define EICON_IOCTL_GETTYPE 6
|
||||
#define EICON_IOCTL_LOADPCI 7
|
||||
#define EICON_IOCTL_LOADISA 8
|
||||
#define EICON_IOCTL_GETVER 9
|
||||
#define EICON_IOCTL_GETXLOG 10
|
||||
|
||||
#define EICON_IOCTL_MANIF 90
|
||||
|
||||
#define EICON_IOCTL_FREEIT 97
|
||||
#define EICON_IOCTL_TEST 98
|
||||
#define EICON_IOCTL_DEBUGVAR 99
|
||||
|
||||
#define EICON_IOCTL_DIA_OFFSET 100
|
||||
|
||||
/* Bus types */
|
||||
#define EICON_BUS_ISA 1
|
||||
#define EICON_BUS_MCA 2
|
||||
#define EICON_BUS_PCI 3
|
||||
|
||||
/* Constants for describing Card-Type */
|
||||
#define EICON_CTYPE_S 0
|
||||
#define EICON_CTYPE_SX 1
|
||||
#define EICON_CTYPE_SCOM 2
|
||||
#define EICON_CTYPE_QUADRO 3
|
||||
#define EICON_CTYPE_S2M 4
|
||||
#define EICON_CTYPE_MAESTRA 5
|
||||
#define EICON_CTYPE_MAESTRAQ 6
|
||||
#define EICON_CTYPE_MAESTRAQ_U 7
|
||||
#define EICON_CTYPE_MAESTRAP 8
|
||||
#define EICON_CTYPE_ISABRI 0x10
|
||||
#define EICON_CTYPE_ISAPRI 0x20
|
||||
#define EICON_CTYPE_MASK 0x0f
|
||||
#define EICON_CTYPE_QUADRO_NR(n) (n<<4)
|
||||
|
||||
#define MAX_HEADER_LEN 10
|
||||
|
||||
#define MAX_STATUS_BUFFER 150
|
||||
|
||||
/* Struct for adding new cards */
|
||||
typedef struct eicon_cdef {
|
||||
int membase;
|
||||
int irq;
|
||||
char id[10];
|
||||
} eicon_cdef;
|
||||
|
||||
#define EICON_ISA_BOOT_MEMCHK 1
|
||||
#define EICON_ISA_BOOT_NORMAL 2
|
||||
|
||||
/* Struct for downloading protocol via ioctl for ISA cards */
|
||||
/* same struct for downloading protocol via ioctl for MCA cards */
|
||||
typedef struct {
|
||||
/* start-up parameters */
|
||||
unsigned char tei;
|
||||
unsigned char nt2;
|
||||
unsigned char skip1;
|
||||
unsigned char WatchDog;
|
||||
unsigned char Permanent;
|
||||
unsigned char XInterface;
|
||||
unsigned char StableL2;
|
||||
unsigned char NoOrderCheck;
|
||||
unsigned char HandsetType;
|
||||
unsigned char skip2;
|
||||
unsigned char LowChannel;
|
||||
unsigned char ProtVersion;
|
||||
unsigned char Crc4;
|
||||
unsigned char Loopback;
|
||||
unsigned char oad[32];
|
||||
unsigned char osa[32];
|
||||
unsigned char spid[32];
|
||||
unsigned char boot_opt;
|
||||
unsigned long bootstrap_len;
|
||||
unsigned long firmware_len;
|
||||
unsigned char code[1]; /* Rest (bootstrap- and firmware code) will be allocated */
|
||||
} eicon_isa_codebuf;
|
||||
|
||||
/* Data for downloading protocol via ioctl */
|
||||
typedef union {
|
||||
eicon_isa_codebuf isa;
|
||||
eicon_isa_codebuf mca;
|
||||
} eicon_codebuf;
|
||||
|
||||
/* Data for Management interface */
|
||||
typedef struct {
|
||||
int count;
|
||||
int pos;
|
||||
int length[50];
|
||||
unsigned char data[700];
|
||||
} eicon_manifbuf;
|
||||
|
||||
#define TRACE_OK (1)
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/* Kernel includes */
|
||||
#include <linux/config.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/tqueue.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/skbuff.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/major.h>
|
||||
#include <asm/segment.h>
|
||||
#include <asm/io.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/signal.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/mman.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/timer.h>
|
||||
#include <linux/wait.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/ctype.h>
|
||||
#include <linux/pci.h>
|
||||
|
||||
#include <linux/isdn.h>
|
||||
#include <linux/isdnif.h>
|
||||
|
||||
|
||||
typedef struct {
|
||||
__u16 length __attribute__ ((packed)); /* length of data/parameter field */
|
||||
__u8 P[1]; /* data/parameter field */
|
||||
} eicon_PBUFFER;
|
||||
|
||||
#include "eicon_isa.h"
|
||||
|
||||
#include "idi.h"
|
||||
|
||||
typedef struct {
|
||||
__u16 NextReq __attribute__ ((packed)); /* pointer to next Req Buffer */
|
||||
__u16 NextRc __attribute__ ((packed)); /* pointer to next Rc Buffer */
|
||||
__u16 NextInd __attribute__ ((packed)); /* pointer to next Ind Buffer */
|
||||
__u8 ReqInput __attribute__ ((packed)); /* number of Req Buffers sent */
|
||||
__u8 ReqOutput __attribute__ ((packed)); /* number of Req Buffers returned */
|
||||
__u8 ReqReserved __attribute__ ((packed));/*number of Req Buffers reserved */
|
||||
__u8 Int __attribute__ ((packed)); /* ISDN-P interrupt */
|
||||
__u8 XLock __attribute__ ((packed)); /* Lock field for arbitration */
|
||||
__u8 RcOutput __attribute__ ((packed)); /* number of Rc buffers received */
|
||||
__u8 IndOutput __attribute__ ((packed)); /* number of Ind buffers received */
|
||||
__u8 IMask __attribute__ ((packed)); /* Interrupt Mask Flag */
|
||||
__u8 Reserved1[2] __attribute__ ((packed)); /* reserved field, do not use */
|
||||
__u8 ReadyInt __attribute__ ((packed)); /* request field for ready int */
|
||||
__u8 Reserved2[12] __attribute__ ((packed)); /* reserved field, do not use */
|
||||
__u8 InterfaceType __attribute__ ((packed)); /* interface type 1=16K */
|
||||
__u16 Signature __attribute__ ((packed)); /* ISDN-P initialized ind */
|
||||
__u8 B[1]; /* buffer space for Req,Ind and Rc */
|
||||
} eicon_pr_ram;
|
||||
|
||||
/* Macro for delay via schedule() */
|
||||
#define SLEEP(j) { \
|
||||
set_current_state(TASK_UNINTERRUPTIBLE); \
|
||||
schedule_timeout(j); \
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
__u8 Req; /* pending request */
|
||||
__u8 Rc; /* return code received */
|
||||
__u8 Ind; /* indication received */
|
||||
__u8 ReqCh; /* channel of current Req */
|
||||
__u8 RcCh; /* channel of current Rc */
|
||||
__u8 IndCh; /* channel of current Ind */
|
||||
__u8 D3Id; /* ID used by this entity */
|
||||
__u8 B2Id; /* ID used by this entity */
|
||||
__u8 GlobalId; /* reserved field */
|
||||
__u8 XNum; /* number of X-buffers */
|
||||
__u8 RNum; /* number of R-buffers */
|
||||
struct sk_buff_head X; /* X-buffer queue */
|
||||
struct sk_buff_head R; /* R-buffer queue */
|
||||
__u8 RNR; /* receive not ready flag */
|
||||
__u8 complete; /* receive complete status */
|
||||
__u8 busy; /* busy flag */
|
||||
__u16 ref; /* saved reference */
|
||||
} entity;
|
||||
|
||||
#define FAX_MAX_SCANLINE 256
|
||||
|
||||
typedef struct {
|
||||
__u8 PrevObject;
|
||||
__u8 NextObject;
|
||||
__u8 abLine[FAX_MAX_SCANLINE];
|
||||
__u8 abFrame[FAX_MAX_SCANLINE];
|
||||
unsigned int LineLen;
|
||||
unsigned int LineDataLen;
|
||||
__u32 LineData;
|
||||
unsigned int NullBytesPos;
|
||||
__u8 NullByteExist;
|
||||
int PageCount;
|
||||
__u8 Dle;
|
||||
__u8 Eop;
|
||||
} eicon_ch_fax_buf;
|
||||
|
||||
typedef struct {
|
||||
int No; /* Channel Number */
|
||||
unsigned short fsm_state; /* Current D-Channel state */
|
||||
unsigned short statectrl; /* State controling bits */
|
||||
unsigned short eazmask; /* EAZ-Mask for this Channel */
|
||||
int queued; /* User-Data Bytes in TX queue */
|
||||
int pqueued; /* User-Data Packets in TX queue */
|
||||
int waitq; /* User-Data Bytes in wait queue */
|
||||
int waitpq; /* User-Data Bytes in packet queue */
|
||||
struct sk_buff *tskb1; /* temp skb 1 */
|
||||
struct sk_buff *tskb2; /* temp skb 2 */
|
||||
unsigned char l2prot; /* Layer 2 protocol */
|
||||
unsigned char l3prot; /* Layer 3 protocol */
|
||||
#ifdef CONFIG_ISDN_TTY_FAX
|
||||
T30_s *fax; /* pointer to fax data in LL */
|
||||
eicon_ch_fax_buf fax2; /* fax related struct */
|
||||
#endif
|
||||
entity e; /* Native Entity */
|
||||
ENTITY de; /* Divas D Entity */
|
||||
ENTITY be; /* Divas B Entity */
|
||||
char cpn[32]; /* remember cpn */
|
||||
char oad[32]; /* remember oad */
|
||||
char dsa[32]; /* remember dsa */
|
||||
char osa[32]; /* remember osa */
|
||||
unsigned char cause[2]; /* Last Cause */
|
||||
unsigned char si1;
|
||||
unsigned char si2;
|
||||
unsigned char plan;
|
||||
unsigned char screen;
|
||||
} eicon_chan;
|
||||
|
||||
typedef struct {
|
||||
eicon_chan *ptr;
|
||||
} eicon_chan_ptr;
|
||||
|
||||
#include "eicon_pci.h"
|
||||
|
||||
#define EICON_FLAGS_RUNNING 1 /* Cards driver activated */
|
||||
#define EICON_FLAGS_PVALID 2 /* Cards port is valid */
|
||||
#define EICON_FLAGS_IVALID 4 /* Cards irq is valid */
|
||||
#define EICON_FLAGS_MVALID 8 /* Cards membase is valid */
|
||||
#define EICON_FLAGS_LOADED 8 /* Firmware loaded */
|
||||
|
||||
/* D-Channel states */
|
||||
#define EICON_STATE_NULL 0
|
||||
#define EICON_STATE_ICALL 1
|
||||
#define EICON_STATE_OCALL 2
|
||||
#define EICON_STATE_IWAIT 3
|
||||
#define EICON_STATE_OWAIT 4
|
||||
#define EICON_STATE_IBWAIT 5
|
||||
#define EICON_STATE_OBWAIT 6
|
||||
#define EICON_STATE_BWAIT 7
|
||||
#define EICON_STATE_BHWAIT 8
|
||||
#define EICON_STATE_BHWAIT2 9
|
||||
#define EICON_STATE_DHWAIT 10
|
||||
#define EICON_STATE_DHWAIT2 11
|
||||
#define EICON_STATE_BSETUP 12
|
||||
#define EICON_STATE_ACTIVE 13
|
||||
#define EICON_STATE_ICALLW 14
|
||||
#define EICON_STATE_LISTEN 15
|
||||
#define EICON_STATE_WMCONN 16
|
||||
|
||||
#define EICON_MAX_QUEUE 2138
|
||||
|
||||
typedef union {
|
||||
eicon_isa_card isa;
|
||||
eicon_pci_card pci;
|
||||
eicon_isa_card mca;
|
||||
} eicon_hwif;
|
||||
|
||||
typedef struct {
|
||||
__u8 ret;
|
||||
__u8 id;
|
||||
__u8 ch;
|
||||
} eicon_ack;
|
||||
|
||||
typedef struct {
|
||||
__u8 code;
|
||||
__u8 id;
|
||||
__u8 ch;
|
||||
} eicon_req;
|
||||
|
||||
typedef struct {
|
||||
__u8 ret;
|
||||
__u8 id;
|
||||
__u8 ch;
|
||||
__u8 more;
|
||||
} eicon_indhdr;
|
||||
|
||||
/*
|
||||
* Per card driver data
|
||||
*/
|
||||
typedef struct eicon_card {
|
||||
eicon_hwif hwif; /* Hardware dependant interface */
|
||||
DESCRIPTOR *d; /* IDI Descriptor */
|
||||
u_char ptype; /* Protocol type (1TR6 or Euro) */
|
||||
u_char bus; /* Bustype (ISA, MCA, PCI) */
|
||||
u_char type; /* Cardtype (EICON_CTYPE_...) */
|
||||
struct eicon_card *qnext; /* Pointer to next quadro adapter */
|
||||
int Feature; /* Protocol Feature Value */
|
||||
struct eicon_card *next; /* Pointer to next device struct */
|
||||
int myid; /* Driver-Nr. assigned by linklevel */
|
||||
unsigned long flags; /* Statusflags */
|
||||
struct sk_buff_head rcvq; /* Receive-Message queue */
|
||||
struct sk_buff_head sndq; /* Send-Message queue */
|
||||
struct sk_buff_head rackq; /* Req-Ack-Message queue */
|
||||
struct sk_buff_head sackq; /* Data-Ack-Message queue */
|
||||
struct sk_buff_head statq; /* Status-Message queue */
|
||||
int statq_entries;
|
||||
struct tq_struct snd_tq; /* Task struct for xmit bh */
|
||||
struct tq_struct rcv_tq; /* Task struct for rcv bh */
|
||||
struct tq_struct ack_tq; /* Task struct for ack bh */
|
||||
eicon_chan* IdTable[256]; /* Table to find entity */
|
||||
__u16 ref_in;
|
||||
__u16 ref_out;
|
||||
int nchannels; /* Number of B-Channels */
|
||||
int ReadyInt; /* Ready Interrupt */
|
||||
eicon_chan *bch; /* B-Channel status/control */
|
||||
DBUFFER *dbuf; /* Dbuffer for Diva Server */
|
||||
BUFFERS *sbuf; /* Buffer for Diva Server */
|
||||
char *sbufp; /* Data Buffer for Diva Server */
|
||||
isdn_if interface; /* Interface to upper layer */
|
||||
char regname[35]; /* Drivers card name */
|
||||
#ifdef CONFIG_MCA
|
||||
int mca_slot; /* # of cards MCA slot */
|
||||
int mca_io; /* MCA cards IO port */
|
||||
#endif /* CONFIG_MCA */
|
||||
} eicon_card;
|
||||
|
||||
#include "eicon_idi.h"
|
||||
|
||||
extern eicon_card *cards;
|
||||
extern char *eicon_ctype_name[];
|
||||
|
||||
|
||||
extern __inline__ void eicon_schedule_tx(eicon_card *card)
|
||||
{
|
||||
queue_task(&card->snd_tq, &tq_immediate);
|
||||
mark_bh(IMMEDIATE_BH);
|
||||
}
|
||||
|
||||
extern __inline__ void eicon_schedule_rx(eicon_card *card)
|
||||
{
|
||||
queue_task(&card->rcv_tq, &tq_immediate);
|
||||
mark_bh(IMMEDIATE_BH);
|
||||
}
|
||||
|
||||
extern __inline__ void eicon_schedule_ack(eicon_card *card)
|
||||
{
|
||||
queue_task(&card->ack_tq, &tq_immediate);
|
||||
mark_bh(IMMEDIATE_BH);
|
||||
}
|
||||
|
||||
extern int eicon_addcard(int, int, int, char *, int);
|
||||
extern void eicon_io_transmit(eicon_card *card);
|
||||
extern void eicon_irq(int irq, void *dev_id, struct pt_regs *regs);
|
||||
extern void eicon_io_rcv_dispatch(eicon_card *ccard);
|
||||
extern void eicon_io_ack_dispatch(eicon_card *ccard);
|
||||
#ifdef CONFIG_MCA
|
||||
extern int eicon_mca_find_card(int, int, int, char *);
|
||||
extern int eicon_mca_probe(int, int, int, int, char *);
|
||||
extern int eicon_info(char *, int , void *);
|
||||
#endif /* CONFIG_MCA */
|
||||
|
||||
extern ulong DebugVar;
|
||||
extern void eicon_log(eicon_card * card, int level, const char *fmt, ...);
|
||||
extern void eicon_putstatus(eicon_card * card, char * buf);
|
||||
|
||||
extern spinlock_t eicon_lock;
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* eicon_h */
|
|
@ -0,0 +1,129 @@
|
|||
/*
|
||||
* External IDI interface
|
||||
*
|
||||
* Copyright (C) Eicon Technology Corporation, 2000.
|
||||
*
|
||||
* Eicon File Revision : 1.0
|
||||
*
|
||||
* This software may be used and distributed according to the terms
|
||||
* of the GNU General Public License, incorporated herein by reference.
|
||||
*
|
||||
*/
|
||||
|
||||
#if !defined(IDI_H)
|
||||
#define IDI_H
|
||||
|
||||
#include "sys.h"
|
||||
|
||||
/* typedefs for our data structures */
|
||||
|
||||
typedef struct get_name_s GET_NAME;
|
||||
typedef struct entity_s ENTITY;
|
||||
typedef struct buffers_s BUFFERS;
|
||||
|
||||
/* IDI request/callback function pointer */
|
||||
|
||||
typedef void (* IDI_CALL)(ENTITY *);
|
||||
|
||||
typedef struct {
|
||||
word length; /* length of data/parameter field */
|
||||
byte P[270]; /* data/parameter field */
|
||||
} DBUFFER;
|
||||
|
||||
#define REQ_NAME 0x0100
|
||||
#define BOARD_NAME_LENGTH 9
|
||||
struct get_name_s {
|
||||
word command; /* command = 0x0100 */
|
||||
byte name[BOARD_NAME_LENGTH];
|
||||
};
|
||||
|
||||
#define REQ_REMOVE 0x0000 /* pointer to word which is 0 */
|
||||
#define REQ_SERIAL 0x0200
|
||||
struct get_serial_s {
|
||||
word command; /* command = 0x0200 */
|
||||
dword serial; /* serial number */
|
||||
};
|
||||
|
||||
#define REQ_POSTCALL 0x0300
|
||||
struct postcall_s {
|
||||
word command; /* command = 0x0300 */
|
||||
word dummy; /* not used */
|
||||
IDI_CALL callback; /* routine address to call back */
|
||||
ENTITY *contxt; /* ptr to entity to use */
|
||||
};
|
||||
|
||||
#define REQ_XLOG 0x0400 /* structure is card dependent/defined locally */
|
||||
|
||||
struct buffers_s {
|
||||
word PLength;
|
||||
byte *P;
|
||||
};
|
||||
|
||||
struct entity_s {
|
||||
byte Req; /* pending request */
|
||||
byte Rc; /* return code received */
|
||||
byte Ind; /* indication received */
|
||||
byte ReqCh; /* channel of current Req */
|
||||
byte RcCh; /* channel of current Rc */
|
||||
byte IndCh; /* channel of current Ind */
|
||||
byte Id; /* ID used by this entity */
|
||||
byte GlobalId; /* reserved field */
|
||||
byte XNum; /* number of X-buffers */
|
||||
byte RNum; /* number of R-buffers */
|
||||
BUFFERS *X; /* pointer to X-buffer list */
|
||||
BUFFERS *R; /* pointer to R-buffer list */
|
||||
word RLength; /* length of current R-data */
|
||||
DBUFFER *RBuffer; /* buffer of current R-data */
|
||||
byte RNR; /* receive not ready flag */
|
||||
byte complete; /* receive complete status */
|
||||
IDI_CALL callback;
|
||||
|
||||
word user[2];
|
||||
|
||||
/* fields used by the driver internally */
|
||||
byte No; /* entity number */
|
||||
byte reserved2; /* reserved field */
|
||||
byte More; /* R/X More flags */
|
||||
byte MInd; /* MDATA coding for this ID */
|
||||
byte XCurrent; /* current transmit buffer */
|
||||
byte RCurrent; /* current receive buffer */
|
||||
word XOffset; /* offset in x-buffer */
|
||||
word ROffset; /* offset in r-buffer */
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
byte type;
|
||||
byte channels;
|
||||
word features;
|
||||
/* dword serial; */
|
||||
IDI_CALL request;
|
||||
} DESCRIPTOR;
|
||||
|
||||
extern void DIVA_DIDD_Read(DESCRIPTOR *, int);
|
||||
|
||||
/* descriptor type field coding */
|
||||
#define IDI_ADAPTER_S 1
|
||||
#define IDI_ADAPTER_PR 2
|
||||
#define IDI_ADAPTER_DIVA 3
|
||||
#define IDI_ADAPTER_MAESTRA 4
|
||||
#define IDI_ADAPTER_MAESTRAQ 5
|
||||
#define IDI_ADAPTER_MAESTRAP 6
|
||||
#define IDI_VADAPTER 0x40
|
||||
#define IDI_DRIVER 0x80
|
||||
#define IDI_DIMAINT 0xff
|
||||
|
||||
/* feature bit mask values */
|
||||
|
||||
#define DI_VOICE 0x0 /* obsolete define */
|
||||
#define DI_FAX3 0x1
|
||||
#define DI_MODEM 0x2
|
||||
#define DI_POST 0x4
|
||||
#define DI_V110 0x8
|
||||
#define DI_V120 0x10
|
||||
#define DI_POTS 0x20
|
||||
#define DI_CODEC 0x40
|
||||
#define DI_MANAGE 0x80
|
||||
#define DI_V_42 0x0100
|
||||
#define DI_EXTD_FAX 0x0200 /* Extended FAX (ECM, 2D, T.6, Polling) */
|
||||
|
||||
#endif /* IDI_H */
|
|
@ -0,0 +1,297 @@
|
|||
/*
|
||||
* Copyright (C) Eicon Technology Corporation, 2000.
|
||||
*
|
||||
* Eicon File Revision : 1.2
|
||||
*
|
||||
* This software may be used and distributed according to the terms
|
||||
* of the GNU General Public License, incorporated herein by reference.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PC_H_INCLUDED
|
||||
#define PC_H_INCLUDED
|
||||
|
||||
|
||||
#define byte unsigned char
|
||||
#define word unsigned short
|
||||
#define dword unsigned long
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
/* buffer definition */
|
||||
/*------------------------------------------------------------------*/
|
||||
|
||||
typedef struct {
|
||||
word length; /* length of data/parameter field */
|
||||
byte P[270]; /* data/parameter field */
|
||||
} PBUFFER;
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
/* dual port ram structure */
|
||||
/*------------------------------------------------------------------*/
|
||||
|
||||
struct dual
|
||||
{
|
||||
byte Req; /* request register */
|
||||
byte ReqId; /* request task/entity identification */
|
||||
byte Rc; /* return code register */
|
||||
byte RcId; /* return code task/entity identification */
|
||||
byte Ind; /* Indication register */
|
||||
byte IndId; /* Indication task/entity identification */
|
||||
byte IMask; /* Interrupt Mask Flag */
|
||||
byte RNR; /* Receiver Not Ready (set by PC) */
|
||||
byte XLock; /* XBuffer locked Flag */
|
||||
byte Int; /* ISDN-S interrupt */
|
||||
byte ReqCh; /* Channel field for layer-3 Requests */
|
||||
byte RcCh; /* Channel field for layer-3 Returncodes */
|
||||
byte IndCh; /* Channel field for layer-3 Indications */
|
||||
byte MInd; /* more data indication field */
|
||||
word MLength; /* more data total packet length */
|
||||
byte ReadyInt; /* request field for ready interrupt */
|
||||
byte SWReg; /* Software register for special purposes */
|
||||
byte Reserved[11]; /* reserved space */
|
||||
byte InterfaceType; /* interface type 1=16K interface */
|
||||
word Signature; /* ISDN-S adapter Signature (GD) */
|
||||
PBUFFER XBuffer; /* Transmit Buffer */
|
||||
PBUFFER RBuffer; /* Receive Buffer */
|
||||
};
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
/* SWReg Values (0 means no command) */
|
||||
/*------------------------------------------------------------------*/
|
||||
#define SWREG_DIE_WITH_LEDON 0x01
|
||||
#define SWREG_HALT_CPU 0x02 /* Push CPU into a while(1) loop */
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
/* Id Fields Coding */
|
||||
/*------------------------------------------------------------------*/
|
||||
|
||||
#define ID_MASK 0xe0 /* Mask for the ID field */
|
||||
#define GL_ERR_ID 0x1f /* ID for error reporting on global requests*/
|
||||
|
||||
#define DSIG_ID 0x00 /* ID for D-channel signaling */
|
||||
#define NL_ID 0x20 /* ID for network-layer access (B or D) */
|
||||
#define BLLC_ID 0x60 /* ID for B-channel link level access */
|
||||
#define TASK_ID 0x80 /* ID for dynamic user tasks */
|
||||
#define TIMER_ID 0xa0 /* ID for timer task */
|
||||
#define TEL_ID 0xc0 /* ID for telephone support */
|
||||
#define MAN_ID 0xe0 /* ID for management */
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
/* ASSIGN and REMOVE requests are the same for all entities */
|
||||
/*------------------------------------------------------------------*/
|
||||
|
||||
#define ASSIGN 0x01
|
||||
#define UREMOVE 0xfe /* without returncode */
|
||||
#define REMOVE 0xff
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
/* Timer Interrupt Task Interface */
|
||||
/*------------------------------------------------------------------*/
|
||||
|
||||
#define ASSIGN_TIM 0x01
|
||||
#define REMOVE_TIM 0xff
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
/* dynamic user task interface */
|
||||
/*------------------------------------------------------------------*/
|
||||
|
||||
#define ASSIGN_TSK 0x01
|
||||
#define REMOVE_TSK 0xff
|
||||
|
||||
#define LOAD 0xf0
|
||||
#define RELOCATE 0xf1
|
||||
#define START 0xf2
|
||||
#define LOAD2 0xf3
|
||||
#define RELOCATE2 0xf4
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
/* dynamic user task messages */
|
||||
/*------------------------------------------------------------------*/
|
||||
|
||||
#define TSK_B2 0x0000
|
||||
#define TSK_WAKEUP 0x2000
|
||||
#define TSK_TIMER 0x4000
|
||||
#define TSK_TSK 0x6000
|
||||
#define TSK_PC 0xe000
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
/* LL management primitives */
|
||||
/*------------------------------------------------------------------*/
|
||||
|
||||
#define ASSIGN_LL 1 /* assign logical link */
|
||||
#define REMOVE_LL 0xff /* remove logical link */
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
/* LL service primitives */
|
||||
/*------------------------------------------------------------------*/
|
||||
|
||||
#define LL_UDATA 1 /* link unit data request/indication */
|
||||
#define LL_ESTABLISH 2 /* link establish request/indication */
|
||||
#define LL_RELEASE 3 /* link release request/indication */
|
||||
#define LL_DATA 4 /* data request/indication */
|
||||
#define LL_LOCAL 5 /* switch to local operation (COM only) */
|
||||
#define LL_DATA_PEND 5 /* data pending indication (SDLC SHM only) */
|
||||
#define LL_REMOTE 6 /* switch to remote operation (COM only) */
|
||||
#define LL_TEST 8 /* link test request */
|
||||
#define LL_MDATA 9 /* more data request/indication */
|
||||
#define LL_BUDATA 10 /* broadcast unit data request/indication */
|
||||
#define LL_XID 12 /* XID command request/indication */
|
||||
#define LL_XID_R 13 /* XID response request/indication */
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
/* NL service primitives */
|
||||
/*------------------------------------------------------------------*/
|
||||
|
||||
#define N_MDATA 1 /* more data to come REQ/IND */
|
||||
#define N_CONNECT 2 /* OSI N-CONNECT REQ/IND */
|
||||
#define N_CONNECT_ACK 3 /* OSI N-CONNECT CON/RES */
|
||||
#define N_DISC 4 /* OSI N-DISC REQ/IND */
|
||||
#define N_DISC_ACK 5 /* OSI N-DISC CON/RES */
|
||||
#define N_RESET 6 /* OSI N-RESET REQ/IND */
|
||||
#define N_RESET_ACK 7 /* OSI N-RESET CON/RES */
|
||||
#define N_DATA 8 /* OSI N-DATA REQ/IND */
|
||||
#define N_EDATA 9 /* OSI N-EXPEDITED DATA REQ/IND */
|
||||
#define N_UDATA 10 /* OSI D-UNIT-DATA REQ/IND */
|
||||
#define N_BDATA 11 /* BROADCAST-DATA REQ/IND */
|
||||
#define N_DATA_ACK 12 /* data ack ind for D-bit procedure */
|
||||
#define N_EDATA_ACK 13 /* data ack ind for INTERRUPT */
|
||||
|
||||
#define N_Q_BIT 0x10 /* Q-bit for req/ind */
|
||||
#define N_M_BIT 0x20 /* M-bit for req/ind */
|
||||
#define N_D_BIT 0x40 /* D-bit for req/ind */
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
/* Signaling management primitives */
|
||||
/*------------------------------------------------------------------*/
|
||||
|
||||
#define ASSIGN_SIG 1 /* assign signaling task */
|
||||
#define UREMOVE_SIG 0xfe /* remove signaling task without returncode */
|
||||
#define REMOVE_SIG 0xff /* remove signaling task */
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
/* Signaling service primitives */
|
||||
/*------------------------------------------------------------------*/
|
||||
|
||||
#define CALL_REQ 1 /* call request */
|
||||
#define CALL_CON 1 /* call confirmation */
|
||||
#define CALL_IND 2 /* incoming call connected */
|
||||
#define LISTEN_REQ 2 /* listen request */
|
||||
#define HANGUP 3 /* hangup request/indication */
|
||||
#define SUSPEND 4 /* call suspend request/confirm */
|
||||
#define RESUME 5 /* call resume request/confirm */
|
||||
#define SUSPEND_REJ 6 /* suspend rejected indication */
|
||||
#define USER_DATA 8 /* user data for user to user signaling */
|
||||
#define CONGESTION 9 /* network congestion indication */
|
||||
#define INDICATE_REQ 10 /* request to indicate an incoming call */
|
||||
#define INDICATE_IND 10 /* indicates that there is an incoming call */
|
||||
#define CALL_RES 11 /* accept an incoming call */
|
||||
#define CALL_ALERT 12 /* send ALERT for incoming call */
|
||||
#define INFO_REQ 13 /* INFO request */
|
||||
#define INFO_IND 13 /* INFO indication */
|
||||
#define REJECT 14 /* reject an incoming call */
|
||||
#define RESOURCES 15 /* reserve B-Channel hardware resources */
|
||||
#define TEL_CTRL 16 /* Telephone control request/indication */
|
||||
#define STATUS_REQ 17 /* Request D-State (returned in INFO_IND) */
|
||||
#define FAC_REG_REQ 18 /* connection idependent fac registration */
|
||||
#define FAC_REG_ACK 19 /* fac registration acknowledge */
|
||||
#define FAC_REG_REJ 20 /* fac registration reject */
|
||||
#define CALL_COMPLETE 21/* send a CALL_PROC for incoming call */
|
||||
#define FACILITY_REQ 22 /* send a Facility Message type */
|
||||
#define FACILITY_IND 22 /* Facility Message type indication */
|
||||
#define SIG_CTRL 29 /* Control for signalling hardware */
|
||||
#define DSP_CTRL 30 /* Control for DSPs */
|
||||
#define LAW_REQ 31 /* Law config request for (returns info_i) */
|
||||
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
/* management service primitives */
|
||||
/*------------------------------------------------------------------*/
|
||||
|
||||
#define MAN_READ 2
|
||||
#define MAN_WRITE 3
|
||||
#define MAN_EXECUTE 4
|
||||
#define MAN_EVENT_ON 5
|
||||
#define MAN_EVENT_OFF 6
|
||||
#define MAN_LOCK 7
|
||||
#define MAN_UNLOCK 8
|
||||
|
||||
#define MAN_INFO_IND 2
|
||||
#define MAN_EVENT_IND 3
|
||||
#define MAN_TRACE_IND 4
|
||||
|
||||
#define MAN_ESC 0x80
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
/* return code coding */
|
||||
/*------------------------------------------------------------------*/
|
||||
|
||||
#define UNKNOWN_COMMAND 0x01 /* unknown command */
|
||||
#define WRONG_COMMAND 0x02 /* wrong command */
|
||||
#define WRONG_ID 0x03 /* unknown task/entity id */
|
||||
#define WRONG_CH 0x04 /* wrong task/entity id */
|
||||
#define UNKNOWN_IE 0x05 /* unknown information el. */
|
||||
#define WRONG_IE 0x06 /* wrong information el. */
|
||||
#define OUT_OF_RESOURCES 0x07 /* ISDN-S card out of res. */
|
||||
#define ADAPTER_DEAD 0x08 /* ISDN card CPU halted */
|
||||
#define N_FLOW_CONTROL 0x10 /* Flow-Control, retry */
|
||||
#define ASSIGN_RC 0xe0 /* ASSIGN acknowledgement */
|
||||
#define ASSIGN_OK 0xef /* ASSIGN OK */
|
||||
#define OK_FC 0xfc /* Flow-Control RC */
|
||||
#define READY_INT 0xfd /* Ready interrupt */
|
||||
#define TIMER_INT 0xfe /* timer interrupt */
|
||||
#define OK 0xff /* command accepted */
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
/* information elements */
|
||||
/*------------------------------------------------------------------*/
|
||||
|
||||
#define SHIFT 0x90 /* codeset shift */
|
||||
#define MORE 0xa0 /* more data */
|
||||
#define CL 0xb0 /* congestion level */
|
||||
|
||||
/* codeset 0 */
|
||||
|
||||
#define BC 0x04 /* Bearer Capability */
|
||||
#define CAU 0x08 /* cause */
|
||||
#define CAD 0x0c /* Connected address */
|
||||
#define CAI 0x10 /* call identity */
|
||||
#define CHI 0x18 /* channel identification */
|
||||
#define LLI 0x19 /* logical link id */
|
||||
#define CHA 0x1a /* charge advice */
|
||||
#define DT 0x29 /* ETSI date/time */
|
||||
#define KEY 0x2c /* keypad information element */
|
||||
#define FTY 0x1c /* facility information element */
|
||||
#define DSP 0x28 /* display */
|
||||
#define OAD 0x6c /* origination address */
|
||||
#define OSA 0x6d /* origination sub-address */
|
||||
#define CPN 0x70 /* called party number */
|
||||
#define DSA 0x71 /* destination sub-address */
|
||||
#define RDX 0x73 /* redirected number extended */
|
||||
#define RDN 0x74 /* redirected number */
|
||||
#define LLC 0x7c /* low layer compatibility */
|
||||
#define HLC 0x7d /* high layer compatibility */
|
||||
#define UUI 0x7e /* user user information */
|
||||
#define ESC 0x7f /* escape extension */
|
||||
|
||||
#define DLC 0x20 /* data link layer configuration */
|
||||
#define NLC 0x21 /* network layer configuration */
|
||||
|
||||
/* codeset 6 */
|
||||
|
||||
#define SIN 0x01 /* service indicator */
|
||||
#define CIF 0x02 /* charging information */
|
||||
#define DATE 0x03 /* date */
|
||||
#define CPS 0x07 /* called party status */
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
/* TEL_CTRL contents */
|
||||
/*------------------------------------------------------------------*/
|
||||
|
||||
#define RING_ON 0x01
|
||||
#define RING_OFF 0x02
|
||||
#define HANDS_FREE_ON 0x03
|
||||
#define HANDS_FREE_OFF 0x04
|
||||
#define ON_HOOK 0x80
|
||||
#define OFF_HOOK 0x90
|
||||
|
||||
#endif
|
|
@ -0,0 +1,148 @@
|
|||
/*
|
||||
* Copyright (C) Eicon Technology Corporation, 2000.
|
||||
*
|
||||
* Eicon File Revision : 1.0
|
||||
*
|
||||
* This software may be used and distributed according to the terms
|
||||
* of the GNU General Public License, incorporated herein by reference.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PC_MAINT_H
|
||||
#define PC_MAINT_H
|
||||
|
||||
#if !defined(MIPS_SCOM)
|
||||
#define BUFFER_SZ 48
|
||||
#define MAINT_OFFS 0x380
|
||||
#else
|
||||
#define BUFFER_SZ 128
|
||||
#define MAINT_OFFS 0xff00
|
||||
#endif
|
||||
|
||||
#define MIPS_BUFFER_SZ 128
|
||||
#define MIPS_MAINT_OFFS 0xff00
|
||||
|
||||
#define DO_LOG 1
|
||||
#define MEMR 2
|
||||
#define MEMW 3
|
||||
#define IOR 4
|
||||
#define IOW 5
|
||||
#define B1TEST 6
|
||||
#define B2TEST 7
|
||||
#define BTESTOFF 8
|
||||
#define DSIG_STATS 9
|
||||
#define B_CH_STATS 10
|
||||
#define D_CH_STATS 11
|
||||
#define BL1_STATS 12
|
||||
#define BL1_STATS_C 13
|
||||
#define GET_VERSION 14
|
||||
#define OS_STATS 15
|
||||
#define XLOG_SET_MASK 16
|
||||
#define XLOG_GET_MASK 17
|
||||
#define DSP_READ 20
|
||||
#define DSP_WRITE 21
|
||||
|
||||
#define OK 0xff
|
||||
#define MORE_EVENTS 0xfe
|
||||
#define NO_EVENT 1
|
||||
|
||||
struct DSigStruc
|
||||
{
|
||||
byte Id;
|
||||
byte uX;
|
||||
byte listen;
|
||||
byte active;
|
||||
byte sin[3];
|
||||
byte bc[6];
|
||||
byte llc[6];
|
||||
byte hlc[6];
|
||||
byte oad[20];
|
||||
};
|
||||
|
||||
struct BL1Struc {
|
||||
dword cx_b1;
|
||||
dword cx_b2;
|
||||
dword cr_b1;
|
||||
dword cr_b2;
|
||||
dword px_b1;
|
||||
dword px_b2;
|
||||
dword pr_b1;
|
||||
dword pr_b2;
|
||||
word er_b1;
|
||||
word er_b2;
|
||||
};
|
||||
|
||||
struct L2Struc {
|
||||
dword XTotal;
|
||||
dword RTotal;
|
||||
word XError;
|
||||
word RError;
|
||||
};
|
||||
|
||||
struct OSStruc {
|
||||
word free_n;
|
||||
};
|
||||
|
||||
typedef union
|
||||
{
|
||||
struct DSigStruc DSigStats;
|
||||
struct BL1Struc BL1Stats;
|
||||
struct L2Struc L2Stats;
|
||||
struct OSStruc OSStats;
|
||||
byte b[BUFFER_SZ];
|
||||
word w[BUFFER_SZ>>1];
|
||||
word l[BUFFER_SZ>>2]; /* word is wrong, do not use! Use 'd' instead. */
|
||||
dword d[BUFFER_SZ>>2];
|
||||
} BUFFER;
|
||||
|
||||
typedef union
|
||||
{
|
||||
struct DSigStruc DSigStats;
|
||||
struct BL1Struc BL1Stats;
|
||||
struct L2Struc L2Stats;
|
||||
struct OSStruc OSStats;
|
||||
byte b[MIPS_BUFFER_SZ];
|
||||
word w[MIPS_BUFFER_SZ>>1];
|
||||
word l[BUFFER_SZ>>2]; /* word is wrong, do not use! Use 'd' instead. */
|
||||
dword d[MIPS_BUFFER_SZ>>2];
|
||||
} MIPS_BUFFER;
|
||||
|
||||
|
||||
#if !defined(MIPS_SCOM)
|
||||
struct pc_maint
|
||||
{
|
||||
byte req;
|
||||
byte rc;
|
||||
byte *mem; /*far*/
|
||||
short length;
|
||||
word port;
|
||||
byte fill[6];
|
||||
BUFFER data;
|
||||
};
|
||||
#else
|
||||
struct pc_maint
|
||||
{
|
||||
byte req;
|
||||
byte rc;
|
||||
byte reserved[2]; /* R3000 alignment ... */
|
||||
byte far *mem;
|
||||
short length;
|
||||
word port;
|
||||
byte fill[4]; /* data at offset 16 */
|
||||
BUFFER data;
|
||||
};
|
||||
#endif
|
||||
|
||||
struct mi_pc_maint
|
||||
{
|
||||
byte req;
|
||||
byte rc;
|
||||
byte reserved[2]; /* R3000 alignment ... */
|
||||
byte *mem; /*far*/
|
||||
short length;
|
||||
word port;
|
||||
byte fill[4]; /* data at offset 16 */
|
||||
MIPS_BUFFER data;
|
||||
};
|
||||
|
||||
#endif /* PC_MAINT_H */
|
|
@ -0,0 +1,95 @@
|
|||
/*
|
||||
* Environment provided by system and miscellaneous definitions
|
||||
*
|
||||
* Copyright (C) Eicon Technology Corporation, 2000.
|
||||
*
|
||||
* Eicon File Revision : 1.2
|
||||
*
|
||||
* This software may be used and distributed according to the terms
|
||||
* of the GNU General Public License, incorporated herein by reference.
|
||||
*
|
||||
*/
|
||||
|
||||
#if !defined(SYS_H)
|
||||
#define SYS_H
|
||||
|
||||
/* abreviations for unsigned types */
|
||||
typedef int boolean_t;
|
||||
|
||||
typedef unsigned char byte;
|
||||
|
||||
typedef unsigned long dword;
|
||||
typedef unsigned short word;
|
||||
|
||||
/* abreviations for volatile types */
|
||||
|
||||
typedef volatile byte vbyte;
|
||||
typedef volatile word vword;
|
||||
typedef volatile dword vdword;
|
||||
|
||||
/* Booleans */
|
||||
|
||||
#if !defined(TRUE)
|
||||
#define TRUE (1)
|
||||
#define FALSE (0)
|
||||
#endif
|
||||
|
||||
/* NULL pointer */
|
||||
|
||||
#if !defined(NULL)
|
||||
#define NULL ((void *) 0)
|
||||
#endif
|
||||
|
||||
/* Return the dimension of an array */
|
||||
|
||||
#if !defined(DIM)
|
||||
#define DIM(array) (sizeof (array)/sizeof ((array)[0]))
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Return the number of milliseconds since last boot
|
||||
*/
|
||||
|
||||
extern dword UxTimeGet(void);
|
||||
|
||||
extern void DivasSprintf(char *buffer, char *format, ...);
|
||||
extern void DivasPrintf(char *format, ...);
|
||||
|
||||
/* fatal errors, asserts and tracing */
|
||||
|
||||
void HwFatalErrorFrom(char *file, int line);
|
||||
void HwFatalError(void);
|
||||
/* void HwAssert(char *file, int line, char *condition); */
|
||||
|
||||
/* #include <linux/kernel.h> */
|
||||
/* #include <linux/string.h> */
|
||||
|
||||
#define _PRINTK printk
|
||||
|
||||
#define _PRINTF DivasPrintf
|
||||
void _PRINTF(char *format, ...);
|
||||
#define PRINTF(arg_list) _PRINTF arg_list
|
||||
#if defined DTRACE
|
||||
# define DPRINTF(arg_list) _PRINTF arg_list
|
||||
# define KDPRINTF(arg_list) _PRINTF arg_list ; _PRINTK arg_list ; _PRINTK("\n");
|
||||
#else
|
||||
# define DPRINTF(arg_list) (void)0
|
||||
# define KDPRINTF(arg_list) _PRINTK arg_list ; _PRINTK("\n");
|
||||
#endif
|
||||
|
||||
#if !defined(ASSERT)
|
||||
#if defined DEBUG || defined DBG
|
||||
# define HwFatalError() HwFatalErrorFrom(__FILE__, __LINE__)
|
||||
# define ASSERT(cond) \
|
||||
if (!(cond)) \
|
||||
{ \
|
||||
/* HwAssert(__FILE__, __LINE__, #cond);*/ \
|
||||
}
|
||||
#else
|
||||
# define ASSERT(cond) ((void)0)
|
||||
#endif
|
||||
#endif /* !defined(ASSERT) */
|
||||
|
||||
#define TRACE (_PRINTF(__FILE__"@%d\n", __LINE__))
|
||||
|
||||
#endif /* SYS_H */
|
Loading…
Reference in New Issue