[zaptel-commits] tzafrir: branch tzafrir/sysfs r2933 - in /team/tzafrir/sysfs: ./ build_tools/...
SVN commits to the Zaptel project
zaptel-commits at lists.digium.com
Wed Aug 22 00:51:40 CDT 2007
Author: tzafrir
Date: Wed Aug 22 00:51:37 2007
New Revision: 2933
URL: http://svn.digium.com/view/zaptel?view=rev&rev=2933
Log:
Merging up to zaptel 1.4.5.1:
Merged revisions 2830,2833,2837,2839,2842,2845,2847,2849,2853,2855,2858,2862,2865-2866,2869-2870,2872,2874,2879,2881,2905,2907,2911,2915,2917,2920,2922,2924 via svnmerge from
http://svn.digium.com/svn/zaptel/branches/1.4
................
r2830 | mattf | 2007-08-11 00:58:27 +0300 (Sat, 11 Aug 2007) | 9 lines
Merged revisions 2829 via svnmerge from
http://svn.digium.com/svn/zaptel/branches/1.2
........
r2829 | mattf | 2007-08-10 16:54:56 -0500 (Fri, 10 Aug 2007) | 1 line
Make sure we permit MRM commands
........
................
r2833 | tzafrir | 2007-08-15 00:01:13 +0300 (Wed, 15 Aug 2007) | 10 lines
Merging a few small changes Xorcom:
* Marked with no. 4416, to note that major changes after 4415 were
note merged yet.
* Demote the messages about PCM in non-PCM from notice to debug (r4501).
* Fix sample BRI zapata.conf: NT instead of TE (r4498).
* Disable FXS hardware DTMF detection by default (r4492).
Merged revisions 2832 via svnmerge from
http://svn.digium.com/svn/zaptel/branches/1.2
................
r2837 | tzafrir | 2007-08-15 03:27:03 +0300 (Wed, 15 Aug 2007) | 5 lines
Fix building on older CentOS 4 and Trixbox.
Merged revisions 2836 via svnmerge from
http://svn.digium.com/svn/zaptel/branches/1.2
................
r2839 | tzafrir | 2007-08-15 17:26:03 +0300 (Wed, 15 Aug 2007) | 8 lines
* Allow setting the echo canceller from the Makefile or the environment
(needed for overriding the default EC in Debian m-a builds)
* Allow specifiying extra modules in the make command line:
MODULES_EXTRA and SUBDIRS_EXTRA
Merged revisions 2838 via svnmerge from
http://svn.digium.com/svn/zaptel/branches/1.2
................
r2842 | mattf | 2007-08-15 20:03:02 +0300 (Wed, 15 Aug 2007) | 2 lines
Make sure we use the new ftp.digium.com
................
r2845 | mattf | 2007-08-15 21:10:04 +0300 (Wed, 15 Aug 2007) | 1 line
Make sure that the URL is REALLY up to date
................
r2847 | mattf | 2007-08-16 01:12:58 +0300 (Thu, 16 Aug 2007) | 1 line
Fix for 8277. Inproper alarm handling on dynamic spans
................
r2849 | tzafrir | 2007-08-16 16:32:38 +0300 (Thu, 16 Aug 2007) | 11 lines
Break install target, as in 1.2:
* Provide separate programs and libs targets , and provide separate
install-programs, install-libs , install-includes and install-modules.
* DESTDIR should work. INSTALL_PREFIX was removed, as it was ambigious.
Use the vaiable 'prefix' to override /usr .
* Print a message at the end of the install target.
* Convert shell logic in targets to make logic.
* Still not sure install-libs and install-includes are really needed.
* Use includedir, mandir and libdir (but not sbindir) from configure.
* Install Man pages and utils according to those selected by the user.
................
r2853 | mattf | 2007-08-16 20:05:26 +0300 (Thu, 16 Aug 2007) | 9 lines
Merged revisions 2852 via svnmerge from
http://svn.digium.com/svn/zaptel/branches/1.2
........
r2852 | mattf | 2007-08-16 12:01:18 -0500 (Thu, 16 Aug 2007) | 1 line
Make sure the gain adjustment is only done if the VPM100M is present
........
................
r2855 | tzafrir | 2007-08-16 21:39:40 +0300 (Thu, 16 Aug 2007) | 6 lines
* Add a rule for generating xpp/README.html (not used by default).
* Ignore it, and clean it and README.html .
Merged revisions 2850 via svnmerge from
http://svn.digium.com/svn/zaptel/branches/1.2
................
r2858 | mattf | 2007-08-16 23:04:27 +0300 (Thu, 16 Aug 2007) | 9 lines
Merged revisions 2857 via svnmerge from
http://svn.digium.com/svn/zaptel/branches/1.2
........
r2857 | mattf | 2007-08-16 15:02:58 -0500 (Thu, 16 Aug 2007) | 1 line
Fix for when voicebus based cards stop taking interrupts on some systems
........
................
r2862 | mattf | 2007-08-16 23:10:39 +0300 (Thu, 16 Aug 2007) | 9 lines
Merged revisions 2861 via svnmerge from
http://svn.digium.com/svn/zaptel/branches/1.2
........
r2861 | mattf | 2007-08-16 15:10:03 -0500 (Thu, 16 Aug 2007) | 1 line
Remove some unused variables from compilation
........
................
r2865 | mattf | 2007-08-16 23:48:17 +0300 (Thu, 16 Aug 2007) | 9 lines
Merged revisions 2864 via svnmerge from
http://svn.digium.com/svn/zaptel/branches/1.2
........
r2864 | mattf | 2007-08-16 15:47:46 -0500 (Thu, 16 Aug 2007) | 1 line
Make sure we enable MRM
........
................
r2866 | tzafrir | 2007-08-17 00:10:05 +0300 (Fri, 17 Aug 2007) | 14 lines
xpp rev. 4515:
* BRI improvement: an 'nt_keepalive' parameter to xpd_bri forces
a BRI_NT to retry a connection indefinitely (this is our default).
When false it revert to the behaviour in changeset:4415 ("Bezeq like")
* Improvement in DBG macros. The print_dbg parameter is now set of
flags to debug. They are defined in zap_debug.h
* Don't use Astribanks connected to USB1 interfaces
Unless the user set the option usb1=1 for xpp_usb (r4504).
* And some more documentation...
* Include some of our variables in the default zaptel sample file.
Merged revisions 2860 via svnmerge from
http://svn.digium.com/svn/zaptel/branches/1.2
................
r2869 | tzafrir | 2007-08-17 10:12:36 +0300 (Fri, 17 Aug 2007) | 2 lines
Build menuselect with the HOSTCC.
................
r2870 | tzafrir | 2007-08-17 12:04:05 +0300 (Fri, 17 Aug 2007) | 3 lines
Get LDFLAGS and CFLAGS from autoconf. Make sure that they get
everywhere.
................
r2872 | tzafrir | 2007-08-17 12:28:55 +0300 (Fri, 17 Aug 2007) | 2 lines
No need to merge those changes - the implementation in 1.4 is different.
................
r2874 | tzafrir | 2007-08-17 15:50:36 +0300 (Fri, 17 Aug 2007) | 8 lines
* programs and install-programs are now for all of userspace.
Added the target 'utils' for what 'programs' used to be.
* tonezone.h is installed with install-libs, not install-include .
* Document this.
* Document some other variations on 'make' and 'make install'.
* Improve documentation of /proc/zaptel .
* Ignoring some more utilities.
................
r2879 | tzafrir | 2007-08-17 19:17:20 +0300 (Fri, 17 Aug 2007) | 2 lines
An 1.2-specific fix.
................
r2881 | tzafrir | 2007-08-17 21:13:57 +0300 (Fri, 17 Aug 2007) | 5 lines
install_prereq: Don't install packages twice.
Merged revisions 2880 via svnmerge from
http://svn.digium.com/svn/zaptel/branches/1.2
................
r2905 | tzafrir | 2007-08-19 00:21:05 +0300 (Sun, 19 Aug 2007) | 4 lines
* Fix Makefile typo in 'install-progrms:' (Thanks, Mark Purcell).
* Rename the generated xpp/README.html to xpp/README.Astribank.html to
provide a unique basename among docs (helps debian packaging).
................
r2907 | tzafrir | 2007-08-19 15:12:42 +0300 (Sun, 19 Aug 2007) | 6 lines
Fix README.Astribank with asciidoc 8.2.2: make "underlining" more
strict. (xpp r4519)
Merged revisions 2906 via svnmerge from
http://svn.digium.com/svn/zaptel/branches/1.2
................
r2911 | tzafrir | 2007-08-20 16:29:25 +0300 (Mon, 20 Aug 2007) | 7 lines
* Set maximal zaptel udev timeout to 20 seconds.
* Allow overriding it from cwrcconfconfig file (and explain how).
(From trunk r2909 - got accidentally commited there first).
Merged revisions 2910 via svnmerge from
http://svn.digium.com/svn/zaptel/branches/1.2
................
r2915 | tzafrir | 2007-08-21 11:21:44 +0300 (Tue, 21 Aug 2007) | 9 lines
* Add an explicit mode to the callto open (the default one that is used
anyway).
* Clarify error message.
closes #10505 on Zaptel 1.4.
Merged revisions 2914 via svnmerge from
http://svn.digium.com/svn/zaptel/branches/1.2
................
r2917 | russell | 2007-08-21 18:02:43 +0300 (Tue, 21 Aug 2007) | 1 line
change ftp to downloads
................
r2920 | tzafrir | 2007-08-21 19:49:31 +0300 (Tue, 21 Aug 2007) | 5 lines
Fix building on kernel 2.6.23rc1, from Axel Thimm (xpp r4523).
Merged revisions 2919 via svnmerge from
http://svn.digium.com/svn/zaptel/branches/1.2
................
r2922 | mattf | 2007-08-21 21:11:37 +0300 (Tue, 21 Aug 2007) | 1 line
Add some 2.4 Makefile trickery for wctdm24xxp
................
r2924 | mattf | 2007-08-21 21:42:19 +0300 (Tue, 21 Aug 2007) | 9 lines
Merged revisions 2923 via svnmerge from
http://svn.digium.com/svn/zaptel/branches/1.2
........
r2923 | mattf | 2007-08-21 13:40:23 -0500 (Tue, 21 Aug 2007) | 1 line
Allow wctdm24xxp to compile on a 2.4 based kernel
........
................
Modified:
team/tzafrir/sysfs/ (props changed)
team/tzafrir/sysfs/Makefile
team/tzafrir/sysfs/Makefile.kernel26
team/tzafrir/sysfs/README
team/tzafrir/sysfs/build_tools/install_prereq
team/tzafrir/sysfs/firmware/Makefile
team/tzafrir/sysfs/fxotune.c
team/tzafrir/sysfs/makeopts.in
team/tzafrir/sysfs/wctdm24xxp/GpakApi.c
team/tzafrir/sysfs/wctdm24xxp/GpakCust.c
team/tzafrir/sysfs/wctdm24xxp/GpakCust.h
team/tzafrir/sysfs/wctdm24xxp/base.c
team/tzafrir/sysfs/wctdm24xxp/wctdm24xxp.h
team/tzafrir/sysfs/wcte12xp.c
team/tzafrir/sysfs/xpp/ (props changed)
team/tzafrir/sysfs/xpp/.version
team/tzafrir/sysfs/xpp/ChangeLog
team/tzafrir/sysfs/xpp/README.Astribank
team/tzafrir/sysfs/xpp/card_bri.c
team/tzafrir/sysfs/xpp/card_fxo.c
team/tzafrir/sysfs/xpp/card_fxs.c
team/tzafrir/sysfs/xpp/card_global.c
team/tzafrir/sysfs/xpp/utils/genzaptelconf
team/tzafrir/sysfs/xpp/utils/zconf/Zaptel/Config/Defaults.pm
team/tzafrir/sysfs/xpp/xbus-core.c
team/tzafrir/sysfs/xpp/xbus-sysfs.c
team/tzafrir/sysfs/xpp/xpd.h
team/tzafrir/sysfs/xpp/xpp_usb.c
team/tzafrir/sysfs/xpp/xpp_zap.c
team/tzafrir/sysfs/xpp/xpp_zap.h
team/tzafrir/sysfs/xpp/xproto.c
team/tzafrir/sysfs/xpp/zap_debug.h
team/tzafrir/sysfs/zaptel.init
team/tzafrir/sysfs/zaptel.sysconfig
team/tzafrir/sysfs/zconfig.h
team/tzafrir/sysfs/ztdynamic.c
Propchange: team/tzafrir/sysfs/
------------------------------------------------------------------------------
--- branch-1.2-blocked (original)
+++ branch-1.2-blocked Wed Aug 22 00:51:37 2007
@@ -1,1 +1,1 @@
-/branches/1.2:917,937,1073,1206,1613,2018,2434,2583,2668,2750,2789
+/branches/1.2:917,937,1073,1206,1613,2018,2434,2583,2668,2750,2789,2868,2871,2878
Propchange: team/tzafrir/sysfs/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.
Propchange: team/tzafrir/sysfs/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Aug 22 00:51:37 2007
@@ -16,6 +16,16 @@
fxstest
zttest
fxotune
+patlooptest
+hdlcstress
+ztcfg-dude
+hdlctest
+timertest
+pattest
+hdlcgen
+usbfxstest
+patgen
+hdlcverify
*.ko
*.mod.c
.*.cmd
Propchange: team/tzafrir/sysfs/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Aug 22 00:51:37 2007
@@ -1,1 +1,1 @@
-/branches/1.4:1-2825
+/branches/1.4:1-2932
Modified: team/tzafrir/sysfs/Makefile
URL: http://svn.digium.com/view/zaptel/team/tzafrir/sysfs/Makefile?view=diff&rev=2933&r1=2932&r2=2933
==============================================================================
--- team/tzafrir/sysfs/Makefile (original)
+++ team/tzafrir/sysfs/Makefile Wed Aug 22 00:51:37 2007
@@ -43,7 +43,7 @@
# Set HOTPLUG_FIRMWARE=no to override automatic building with hotplug support
# if it is enabled in the kernel.
ifeq ($(BUILDVER),linux26)
- ifneq (,$(wildcard $(INSTALL_PREFIX)/etc/udev/rules.d))
+ ifneq (,$(wildcard $(DESTDIR)/etc/udev/rules.d))
DYNFS=yes
UDEVRULES=yes
endif
@@ -100,6 +100,8 @@
TOPDIR_MODULES:=pciradio tor2 torisa wcfxo wct1xxp wctdm wcte11xp wcusb zaptel ztd-eth ztd-loc ztdummy ztdynamic zttranscode wcte12xp
SUBDIR_MODULES:=wct4xxp wctc4xxp xpp wctdm24xxp
+TOPDIR_MODULES+=$(MODULES_EXTRA)
+SUBDIR_MODULES+=$(SUBDIRS_EXTRA)
BUILD_TOPDIR_MODULES:=$(filter-out $(MENUSELECT_MODULES),$(TOPDIR_MODULES))
BUILD_SUBDIR_MODULES:=$(filter-out $(MENUSELECT_MODULES),$(SUBDIR_MODULES))
BUILD_MODULES:=$(BUILD_TOPDIR_MODULES) $(BUILD_SUBDIR_MODULES)
@@ -161,6 +163,8 @@
endif
endif
+SELINUX_COND=[ -x /usr/sbin/sestatus ] && (/usr/sbin/sestatus | grep "SELinux status:" | grep -q "enabled")
+
#
# Features are now configured in zconfig.h
#
@@ -171,12 +175,11 @@
CFLAGS+=-DSTANDALONE_ZAPATA
KMAKE = $(MAKE) -C $(KSRC) SUBDIRS=$(PWD)
KMAKE_INST = $(KMAKE) \
- INSTALL_MOD_PATH=$(INSTALL_PREFIX) INSTALL_MOD_DIR=misc modules_install
+ INSTALL_MOD_PATH=$(DESTDIR) INSTALL_MOD_DIR=misc modules_install
ROOT_PREFIX=
-INSTALL_PREFIX=$(DESTDIR)
-
-CONFIG_FILE=$(INSTALL_PREFIX)/etc/zaptel.conf
+
+CONFIG_FILE=$(DESTDIR)/etc/zaptel.conf
CFLAGS+=-DZAPTEL_CONFIG=\"$(CONFIG_FILE)\"
# sample makefile "trace print"
@@ -199,6 +202,7 @@
INIT_TARGET := $(DESTDIR)$(INITRD_DIR)/zaptel
COPY_INITD := install -D zaptel.init $(INIT_TARGET)
endif
+RCCONF_DIR := $(firstword $(wildcard /etc/sysconfig /etc/default))
NETSCR_DIR := $(firstword $(wildcard /etc/sysconfig/network-scripts ))
ifneq (,$(NET_SCR_DIR))
@@ -221,27 +225,48 @@
LTZ_SO_MAJOR_VER:=1
LTZ_SO_MINOR_VER:=0
-BIN_DIR:=$(INSTALL_PREFIX)/sbin
-LIB_DIR:=$(INSTALL_PREFIX)/usr/lib
-INC_DIR:=$(INSTALL_PREFIX)/usr/include
-MOD_DIR:=$(INSTALL_PREFIX)/lib/modules/$(KVERS)/misc
+# libdir, includedir and mandir are defined in makeopts (from
+# configure).
+# we use /sbin, rather than configure's $(sbindir) because we use /sbin
+# for historical reasons.
+BIN_DIR:=/sbin
+LIB_DIR:=$(libdir)
+INC_DIR:=$(includedir)/zaptel
+MAN_DIR:=$(mandir)/man8
+MOD_DIR:=$(DESTDIR)/lib/modules/$(KVERS)/misc
+
+# Utilities we build with a standard build procedure:
+UTILS = tor2ee zttool zttest ztmonitor ztspeed sethdlc-new ztcfg \
+ ztcfg-dude usbfxstest fxstest fxotune ztdiag torisatool
+
+# Makefile mentions them. Source is not included (anynore?)
+UTILS += fxsdump ztprovision
+
+# some tests:
+UTILS += patgen pattest patlooptest hdlcstress hdlctest hdlcgen \
+ hdlcverify timertest
+
+UTILSO = $(UTILS:%=%.o)
BINS:=fxotune fxstest sethdlc-new ztcfg ztdiag ztmonitor ztspeed zttest zttool
-UTILS:=$(filter-out zttool fxstest ztcfg,$(BINS))
-UTILSO:=$(UTILS:%=%.o)
BINS:=$(filter-out $(MENUSELECT_UTILS),$(BINS))
+MAN_PAGES:=$(wildcard $(BINS:%=doc/%.8))
all: menuselect.makeopts
@$(MAKE) _all
-_all: $(if $(BUILD_MODULES),modules) programs $(LTZ_SO) $(LTZ_A)
+_all: $(if $(BUILD_MODULES),modules) programs
+
+libs: $(LTZ_SO) $(LTZ_A)
xpp-utils:
ifeq (yes,$(BUILD_XPP))
@$(MAKE) -C xpp/utils
endif
-programs: $(BINS) xpp-utils
+programs: libs utils
+
+utils: $(BINS) xpp-utils
modules: prereq
@if [ -z "$(KSRC)" -o ! -d "$(KSRC)" ]; then echo "You do not appear to have the sources for the $(KVERS) kernel installed."; exit 1 ; fi
@@ -283,9 +308,6 @@
tonezone.lo: tonezone.c
$(CC) -c $(LCFLAGS) -o $@ $^
-torisatool: torisatool.o
- $(CC) -o $@ $^
-
tones.h: gendigits
./gendigits > $@
@@ -304,7 +326,7 @@
prereq: config.status tones.h tor2fw.h radfw.h version.h
zttool.o: zttool.c zaptel.h
- $(CC) -g -c $(NEWT_INCLUDE) $(CFLAGS) -o $@ $<
+zttool.o: CFLAGS+=$(NEWT_INCLUDE)
ztprovision.o: ztprovision.c zaptel.h
@@ -320,27 +342,25 @@
ranlib $@
$(LTZ_SO): $(LTZ_SO_OBJS)
- $(CC) -shared -Wl,-soname,$(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER) -o $@ $^ -lm
+ $(CC) $(CFLAGS) -shared -Wl,-soname,$(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER) -o $@ $^ $(LDFLAGS) $(LDLIBS) -lm
ztcfg.c: ztcfg.h
ztcfg-shared: ztcfg.o $(LTZ_SO)
- $(CC) -o $@ $^ -lm
+ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LDLIBS) -lm
data:
$(MAKE) -C datamods datamods
ztcfg: ztcfg.o $(LTZ_A)
- $(CC) -o $@ $^ -lm
+ztcfg: LDLIBS+=-lm
ztcfg-dude: ztcfg-dude.o mknotch.o complex.o $(LTZ_SO)
- $(CC) -o $@ $^ -lm -lstdc++
-
-mknotch.o: mknotch.cc
- $(CC) -o $@ -c $^
-
-complex.o: complex.cc
- $(CC) -o $@ -c $^
+ztcfg-dude: LDLIBS+=-lm -lstdc++
+
+# FIXME: we assume CC can build the C++ modules:
+complex.o mknotch.o: %.o: %.cc
+ $(CC) $(CFLAGS) -o $@ -c $<
usbfxstest: LDLIBS+=-lzap
fxstest: $(LTZ_SO)
@@ -364,7 +384,8 @@
wctdm.o: wctdm.h
-wctdm24xxp.o: wctdm.h
+wctdm24xxp/wctdm24xxp.o:
+ $(MAKE) -C wctdm24xxp KFLAGS="$(KFLAGS) -I.." CFLAGS="$(CFLAGS) -I.."
pciradio.o: radfw.h
@@ -384,6 +405,9 @@
README.html: README
asciidoc -n -a toc $<
+
+xpp/README.Astribank.html: xpp/README.Astribank
+ cd $(@D); asciidoc -o $(@F) -n -a toc $(<F)
MISDNVERSION=1_1_3
MISDNUSERVERSION=1_1_3
@@ -400,55 +424,69 @@
echo "**************************************************"; \
exit 1; \
fi
- [ -f mISDN-$(MISDNVERSION).tar.gz ] || $(DOWNLOAD) ftp://ftp.digium.com/pub/zaptel/b410p/mISDN-$(MISDNVERSION).tar.gz
+ [ -f mISDN-$(MISDNVERSION).tar.gz ] || $(DOWNLOAD) http://downloads.digium.com/pub/zaptel/b410p/mISDN-$(MISDNVERSION).tar.gz
tar -zxf mISDN-$(MISDNVERSION).tar.gz
$(MAKE) -C mISDN-$(MISDNVERSION) install
- [ -f mISDNuser-$(MISDNUSERVERSION).tar.gz ] || $(DOWNLOAD) ftp://ftp.digium.com/pub/zaptel/b410p/mISDNuser-$(MISDNUSERVERSION).tar.gz
+ [ -f mISDNuser-$(MISDNUSERVERSION).tar.gz ] || $(DOWNLOAD) http://downloads.digium.com/pub/zaptel/b410p/mISDNuser-$(MISDNUSERVERSION).tar.gz
tar -zxf mISDNuser-$(MISDNUSERVERSION).tar.gz
$(MAKE) -C mISDNuser-$(MISDNUSERVERSION) install
$(UTILS): %: %.o
- $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LDLIBS)
+ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LDLIBS)
$(UTILSO): %.o: %.c
$(CC) $(CFLAGS) -o $@ -c $<
-install: all devices install-modules install-libs install-include install-xpp
-ifeq ($(HOTPLUG_FIRMWARE),yes)
- $(MAKE) -C firmware hotplug-install
-endif
- if [ -f ztcfg ]; then \
- $(INSTALL) -D -m 755 ztcfg $(INSTALL_PREFIX)/sbin/ztcfg; \
- fi
- if [ -f sethdlc-new ]; then \
- $(INSTALL) -D -m 755 sethdlc-new $(INSTALL_PREFIX)/sbin/sethdlc; \
- elif [ -f sethdlc ]; then \
- $(INSTALL) -D -m 755 sethdlc $(INSTALL_PREFIX)/sbin/sethdlc; \
- fi
- if [ -f zttool ]; then \
- $(INSTALL) -D -m 755 zttool $(INSTALL_PREFIX)/sbin/zttool; \
- fi
- $(INSTALL) -m 644 doc/ztcfg.8 $(INSTALL_PREFIX)/usr/share/man/man8
- $(INSTALL) -m 644 doc/zttool.8 $(INSTALL_PREFIX)/usr/share/man/man8
- [ `id -u` = 0 ] && /sbin/depmod -a $(KVERS) || :
- [ -f $(CONFIG_FILE) ] || $(INSTALL) -D -m 644 zaptel.conf.sample $(CONFIG_FILE)
+install: all devices install-modules install-programs firmware
+ @echo "###################################################"
+ @echo "###"
+ @echo "### Zaptel installed successfully."
+ @echo "### If you have not done so before, install init scripts with:"
+ @echo "###"
+ @echo "### make config"
+ @echo "###"
+ @echo "###################################################"
+
+install-programs: install-utils install-libs install-include
+
+install-utils: utils install-xpp
+ install -d $(DESTDIR)$(BIN_DIR)
+ install $(BINS) $(DESTDIR)$(BIN_DIR)/
+ install -d $(DESTDIR)$(MAN_DIR)
+ install -m 644 $(MAN_PAGES) $(DESTDIR)$(MAN_DIR)/
+ifneq (,$(wildcard $(DESTDIR)$(CONFIG_FILE)))
+ $(INSTALL) -D -m 644 zaptel.conf.sample $(DESTDIR)$(CONFIG_FILE)
+endif
+
+# Pushing those two to a separate target that is not used by default:
+install-modconf:
build_tools/genmodconf $(BUILDVER) "$(ROOT_PREFIX)" "$(filter-out zaptel ztdummy xpp zttranscode ztdynamic,$(BUILD_MODULES)) $(MODULE_ALIASES)"
@if [ -d /etc/modutils ]; then \
/sbin/update-modules ; \
fi
-install-libs: $(LTZ_SO) $(LTZ_A)
- $(INSTALL) -D -m 755 $(LTZ_A) $(LIB_DIR)/$(LTZ_A)
- $(INSTALL) -D -m 755 $(LTZ_SO) $(LIB_DIR)/$(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER)
- if [ -z "$(INSTALL_PREFIX)" -a `id -u` = 0 ]; then \
+firmware:
+ifeq ($(HOTPLUG_FIRMWARE),yes)
+ $(MAKE) -C firmware hotplug-install
+endif
+
+install-libs: libs
+ $(INSTALL) -D -m 755 $(LTZ_A) $(DESTDIR)$(LIB_DIR)/$(LTZ_A)
+ $(INSTALL) -D -m 755 $(LTZ_SO) $(DESTDIR)$(LIB_DIR)/$(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER)
+ifeq (,$(DESTDIR))
+ if [ `id -u` = 0 ]; then \
/sbin/ldconfig || : ;\
fi
- rm -f $(LIB_DIR)$(LTZ_SO)
+endif
+ rm -f $(DESTDIR)$(LIB_DIR)$(LTZ_SO)
$(LN) -sf $(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER) \
- $(LIB_DIR)/$(LTZ_SO).$(LTZ_SO_MAJOR_VER)
+ $(DESTDIR)$(LIB_DIR)/$(LTZ_SO).$(LTZ_SO_MAJOR_VER)
$(LN) -sf $(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER) \
- $(LIB_DIR)/$(LTZ_SO)
- if [ -z "$(INSTALL_PREFIX)" ] && [ -x /usr/sbin/sestatus ] && (/usr/sbin/sestatus | grep "SELinux status:" | grep -q "enabled") ; then /sbin/restorecon -v $(LIB_DIR)/$(LTZ_SO); fi
+ $(DESTDIR)$(LIB_DIR)/$(LTZ_SO)
+ifeq (,$(DESTDIR))
+ if $(SELINUX_COND); then /sbin/restorecon -v $(DESTDIR)$(LIB_DIR)/$(LTZ_SO); fi
+endif
+ $(INSTALL) -D -m 644 tonezone.h $(DESTDIR)$(INC_DIR)/tonezone.h
install-xpp:
ifeq (yes,$(BUILD_XPP))
@@ -456,41 +494,35 @@
endif
install-include:
- $(INSTALL) -D -m 644 zaptel.h $(INSTALL_PREFIX)/usr/include/zaptel/zaptel.h
- $(INSTALL) -D -m 644 tonezone.h $(INSTALL_PREFIX)/usr/include/zaptel/tonezone.h
- rm -f $(INSTALL_PREFIX)/usr/include/linux/zaptel.h
- rm -f $(INSTALL_PREFIX)/usr/include/linux/torisa.h
- rm -f $(INSTALL_PREFIX)/usr/include/zaptel.h
- rm -f $(INSTALL_PREFIX)/usr/include/torisa.h
- rm -f $(INSTALL_PREFIX)/usr/include/tonezone.h
+ $(INSTALL) -D -m 644 zaptel.h $(DESTDIR)$(INC_DIR)/zaptel.h
devices:
ifndef DYNFS
- mkdir -p $(INSTALL_PREFIX)/dev/zap
- rm -f $(INSTALL_PREFIX)/dev/zap/ctl
- rm -f $(INSTALL_PREFIX)/dev/zap/channel
- rm -f $(INSTALL_PREFIX)/dev/zap/pseudo
- rm -f $(INSTALL_PREFIX)/dev/zap/timer
- rm -f $(INSTALL_PREFIX)/dev/zap/transcode
- rm -f $(INSTALL_PREFIX)/dev/zap/253
- rm -f $(INSTALL_PREFIX)/dev/zap/252
- rm -f $(INSTALL_PREFIX)/dev/zap/251
- rm -f $(INSTALL_PREFIX)/dev/zap/250
- mknod $(INSTALL_PREFIX)/dev/zap/ctl c 196 0
- mknod $(INSTALL_PREFIX)/dev/zap/transcode c 196 250
- mknod $(INSTALL_PREFIX)/dev/zap/timer c 196 253
- mknod $(INSTALL_PREFIX)/dev/zap/channel c 196 254
- mknod $(INSTALL_PREFIX)/dev/zap/pseudo c 196 255
+ mkdir -p $(DESTDIR)/dev/zap
+ rm -f $(DESTDIR)/dev/zap/ctl
+ rm -f $(DESTDIR)/dev/zap/channel
+ rm -f $(DESTDIR)/dev/zap/pseudo
+ rm -f $(DESTDIR)/dev/zap/timer
+ rm -f $(DESTDIR)/dev/zap/transcode
+ rm -f $(DESTDIR)/dev/zap/253
+ rm -f $(DESTDIR)/dev/zap/252
+ rm -f $(DESTDIR)/dev/zap/251
+ rm -f $(DESTDIR)/dev/zap/250
+ mknod $(DESTDIR)/dev/zap/ctl c 196 0
+ mknod $(DESTDIR)/dev/zap/transcode c 196 250
+ mknod $(DESTDIR)/dev/zap/timer c 196 253
+ mknod $(DESTDIR)/dev/zap/channel c 196 254
+ mknod $(DESTDIR)/dev/zap/pseudo c 196 255
N=1; \
while [ $$N -lt 250 ]; do \
- rm -f $(INSTALL_PREFIX)/dev/zap/$$N; \
- mknod $(INSTALL_PREFIX)/dev/zap/$$N c 196 $$N; \
+ rm -f $(DESTDIR)/dev/zap/$$N; \
+ mknod $(DESTDIR)/dev/zap/$$N c 196 $$N; \
N=$$[$$N+1]; \
done
else # DYNFS
ifdef UDEVRULES
- install -d $(INSTALL_PREFIX)/etc/udev/rules.d
- build_tools/genudevrules > $(INSTALL_PREFIX)/etc/udev/rules.d/zaptel.rules
+ install -d $(DESTDIR)/etc/udev/rules.d
+ build_tools/genudevrules > $(DESTDIR)/etc/udev/rules.d/zaptel.rules
else # !UDEVRULES
@echo "**** Dynamic filesystem detected -- not creating device nodes"
endif
@@ -498,11 +530,6 @@
install-udev: devices
-# make should *fail* and not silently succeed if a program did not build
-install-programs: $(BINS)
- $(INSTALL) -d $(BIN_DIR)
- $(INSTALL) $(BINS) $(BIN_DIR)
-
uninstall-hotplug:
$(MAKE) -C firmware hotplug-uninstall
@@ -510,35 +537,31 @@
ifeq ($(BUILDVER),linux24)
else
for x in $(ALL_MODULES); do \
- rm -f $(INSTALL_PREFIX)/lib/modules/$(KVERS)/extra/$$x ; \
- rm -f $(INSTALL_PREFIX)/lib/modules/$(KVERS)/misc/$$x ; \
- rm -f $(INSTALL_PREFIX)/lib/modules/$(KVERS)/zaptel/$$x ; \
+ rm -f $(DESTDIR)/lib/modules/$(KVERS)/extra/$$x ; \
+ rm -f $(DESTDIR)/lib/modules/$(KVERS)/misc/$$x ; \
+ rm -f $(DESTDIR)/lib/modules/$(KVERS)/zaptel/$$x ; \
done;
endif
install-modules: $(INSTALL_MODULES) uninstall-modules
ifeq ($(BUILDVER),linux24)
- $(INSTALL) -d $(MOD_DIR)
- $(INSTALL) -m 644 $(INSTALL_MODULES) $(MOD_DIR)
+ $(INSTALL) -d $(DESTDIR)$(MOD_DIR)
+ $(INSTALL) -m 644 $(INSTALL_MODULES) $(DESTDIR)$(MOD_DIR)
else
$(KMAKE_INST)
- if [ -f datamods/syncppp.ko ]; then \
- $(MAKE) -C datamods install; \
- fi
-endif
+ ifneq (,$(wildcard datamods/syncppp.ko))
+ $(MAKE) -C datamods install
+ endif
+endif
+ [ `id -u` = 0 ] && /sbin/depmod -a $(KVERS) || :
config:
ifneq (,$(COPY_INITD))
$(COPY_INITD)
endif
-ifneq (,$(wildcard /etc/default))
- ifeq (,$(wildcard $(DESTDIR)/etc/default/zaptel))
- install -D -m 644 zaptel.sysconfig $(DESTDIR)/etc/default/zaptel
- endif
-endif
-ifneq (,$(wildcard /etc/sysconfig))
- ifeq (,$(wildcard $(DESTDIR)/etc/sysconfig/zaptel))
- install -D -m 644 zaptel.sysconfig $(DESTDIR)/etc/sysconfig/zaptel
+ifneq (,$(RCCONF_DIR))
+ ifeq (,$(wildcard $(DESTDIR)$(RCCONF_DIR)/zaptel))
+ $(INSTALL) -D -m 644 zaptel.sysconfig $(DESTDIR)$(RCCONF_DIR)/zaptel
endif
endif
ifneq (,$(COPY_NETSCR))
@@ -593,6 +616,7 @@
rm -f ztcfg-shared fxstest
rm -rf misdn*
rm -rf mISDNuser*
+ rm -rf README.html xpp/README.Astribank.html
distclean: dist-clean
@@ -619,7 +643,7 @@
- at menuselect/menuselect $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) menuselect.makeopts && echo "menuselect changes saved!" || echo "menuselect changes NOT saved!"
menuselect/menuselect: menuselect/menuselect.c menuselect/menuselect_curses.c menuselect/menuselect_stub.c menuselect/menuselect.h menuselect/linkedlists.h config.status
- @CFLAGS="" $(MAKE) -C menuselect
+ @CFLAGS="" $(MAKE) -C menuselect CC=$(HOSTCC)
menuselect-tree: zaptel.xml firmware/firmware.xml
@echo "Generating input for menuselect ..."
Modified: team/tzafrir/sysfs/Makefile.kernel26
URL: http://svn.digium.com/view/zaptel/team/tzafrir/sysfs/Makefile.kernel26?view=diff&rev=2933&r1=2932&r2=2933
==============================================================================
--- team/tzafrir/sysfs/Makefile.kernel26 (original)
+++ team/tzafrir/sysfs/Makefile.kernel26 Wed Aug 22 00:51:37 2007
@@ -1,4 +1,17 @@
+ifndef ECHO_CAN_NAME
+ ECHO_CAN_NAME := MG2
+endif
+ECHO_CAN_CFLAGS := -DECHO_CAN_FROMENV -DECHO_CAN_$(ECHO_CAN_NAME)
+
EXTRA_CFLAGS := -I$(src)
+EXTRA_CFLAGS += $(ECHO_CAN_CFLAGS)
+
+# fix typo present in CentOS and RHEL 2.6.9 kernels
+BAD_KERNELS_VERS := 22 34 34.0.1 34.0.2
+BAD_KERNELS := $(foreach ver,$(BAD_KERNELS_VERS),2.6.9-$(ver).EL 2.6.9-$(ver).ELsmp)
+ifneq (,$(filter $(KVERS),$(BAD_KERNELS)))
+EXTRA_CFLAGS+=-Drw_lock_t=rwlock_t
+endif
zaptel-objs := zaptel-base.o
Modified: team/tzafrir/sysfs/README
URL: http://svn.digium.com/view/zaptel/team/tzafrir/sysfs/README?view=diff&rev=2933&r1=2932&r2=2933
==============================================================================
--- team/tzafrir/sysfs/README (original)
+++ team/tzafrir/sysfs/README Wed Aug 22 00:51:37 2007
@@ -169,6 +169,69 @@
#make config
----------------------------------
+Build Tweaks
+~~~~~~~~~~~~
+Selecting Modules and Utilities
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+You can select the modules and utilities you wish to build and firmwares
+you wish to download by running `make menuselect` . The selection of modules
+that you build (or rather: not build) is saved in the file
+`menuselect.makeopts`.
+
+Extra Modules
+^^^^^^^^^^^^^
+To build extra modules / modules directory not included in the Zaptel
+distribution, use the optional variables MODULES_EXTRA and
+SUBDIRS_EXTRA:
+
+ make MODULES_EXTRA="mod1 mod2"
+ make MODULES_EXTRA="mod1 mod2" SUBDIRS_EXTRA="subdir1/ subdir1/"
+
+Note that those names are not guaranteed to continue to work on newer
+versions. Hopefully there will be no need for such extra configuration.
+
+Partial Build/Install
+^^^^^^^^^^^^^^^^^^^^^
+There are some make targets that are provided to build or install just
+parts of Zaptel:
+
+. Build targets:
+ - make modules: build just the kernel modules.
+ - make programs: Build just the Zaptel userspace programs. partial
+ targets of it:
+ * make 'utilname': builds 'utilname' alone (e.g: `make ztdiag`)
+ * make utils: Build libtonezone.
+ * make libs: Build libtonezone.
+. Install targets:
+ - make install-modules: install just kernel modules.
+ - make firmware: download and install firmwares for Digium cards
+ - make install-programs: Userspace: Partial targets of it are:
+ * make install-utils: install Zaptel userspace programs and
+ and basic support files.
+ * make install-libs: install libtonezone
+ * make install-include: install zaptel.h
+ - make config: should be run once to configure
+
+Building to a Subtree
+^^^^^^^^^^^^^^^^^^^^^
+The following may be useful when testing the package or when preparing a
+package for a binary distribution (such as an rpm package) installing
+onto a subtree rather than on th real system.
+
+ make install DESTDIR=targetdir
+
+This can be useful for any partial install target of the above (e.g:
+install-modules or install-programs).
+
+the targetdir must be an absolute path, at least if you install the
+modules. To install to a relative path you can use something like:
+
+ make install-modules DESTDIR=$PWD/target
+
+The 'install' target might fail if run as a user to a DESTDIR when
+attempting to generate device files. In that case, try:
+
+ make install DESTDIR=$PWD/target DYNFS=
zaptel.conf
~~~~~~~~~~~
@@ -286,8 +349,8 @@
generated, and ditto for spans.
-PROCFS Interface: /proc/zap
-~~~~~~~~~~~~~~~~~~~~~~~~~~~
+PROCFS Interface: /proc/zaptel
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A simple way to get the current list of spans and channels each span
contains is the files under /proc/zaptel . /proc/zaptel is generated by
zaptel as it loads. As each span registers to Zaptel, a file under
@@ -300,8 +363,27 @@
The title line shows the number of the span, its name and title, and
(potentially) the alarms in which it is.
+The title shows the span number and name, followed by any allarms the
+span may have: For example, here is the first span in my system (with no
+alarms):
+
+ Span 1: XBUS-00/XPD-00 "Xorcom XPD #0/0: FXS"
+
The channel line for each channel shows its channel number, name and the
-actual signalling assigned to it through ztcfg.
+actual signalling assigned to it through ztcfg. Before being configured
+by ztcfg: This is Zaptel channel 2, whose name is 'XPP_FXS/0/0/1'.
+
+ 2 XPP_FXS/0/0/1
+
+After being configured by ztcfg: the signalling 'FXOLS' was added. FXS
+channels have FXO signalling and vice versa:
+
+ 2 XPP_FXS/0/0/1 FXOLS
+
+If the channel is in use (typically opened by Asterisk) then you will
+see an extra '(In use)':
+
+ 2 XPP_FXS/0/0/1 FXOLS (In use)
What is the license for the zaptel driver?
Modified: team/tzafrir/sysfs/build_tools/install_prereq
URL: http://svn.digium.com/view/zaptel/team/tzafrir/sysfs/build_tools/install_prereq?view=diff&rev=2933&r1=2932&r2=2933
==============================================================================
--- team/tzafrir/sysfs/build_tools/install_prereq (original)
+++ team/tzafrir/sysfs/build_tools/install_prereq Wed Aug 22 00:51:37 2007
@@ -26,6 +26,23 @@
esac
+# Fixme: should be done by apt and not by dpkg?
+check_installed_debs() {
+ dpkg-query -W --showformat '${Status} ${Package}\n' "$@" 2>/dev/null \
+ | awk '/ not-installed/{print $4}'
+}
+
+# parsing the output of yum is close to impossible.
+# We'll use rpm and hope for the best:
+check_installed_rpms() {
+ for pack in "$@"
+ do
+ if ! rpm -q $pack >/dev/null 2>/dev/null
+ then echo $pack
+ fi
+ done
+}
+
has_kernel_source() {
test -r /lib/modules/$KVERS/build/.config
@@ -38,6 +55,7 @@
handle_debian() {
# echo "# Distribution is Debian or compatible"
kernel_package=''
+ extra_packs=`check_installed_debs $PACKAGES_DEBIAN`
if ! has_kernel_source; then
kernel_package="linux-headers-$KVERS"
debian_release=`cat /etc/debian_version`
@@ -46,15 +64,16 @@
esac
echo "# Kernel source not found. Installing $kernel_package"
fi
- $testcmd apt-get install -y $PACKAGES_DEBIAN $kernel_package
+ $testcmd apt-get install -y $extra_packs $kernel_package
}
handle_rh() {
- # echo "# Distribution is Debian or compatible"
+ # echo "# Distribution is RedHat or similar."
kernel_package=''
+ extra_packs=`check_installed_rpms $PACKAGES_RH`
if ! has_kernel_source; then
kern_str='' # extra "kernel version"
- case $KVERS in
+ case "$KVERS" in
*smp*) kern_str='-smp';;
*PAE*) kern_str='-PAE';;
*xen*) kern_str='-xen';;
@@ -68,7 +87,7 @@
echo "#"
echo "# and then reboot to upgrade to the newly installed kernel."
fi
- $testcmd yum install -y $PACKAGES_RH $kernel_package
+ $testcmd yum install -y $extra_packs $kernel_package
}
if in_test_mode; then
Modified: team/tzafrir/sysfs/firmware/Makefile
URL: http://svn.digium.com/view/zaptel/team/tzafrir/sysfs/firmware/Makefile?view=diff&rev=2933&r1=2932&r2=2933
==============================================================================
--- team/tzafrir/sysfs/firmware/Makefile (original)
+++ team/tzafrir/sysfs/firmware/Makefile Wed Aug 22 00:51:37 2007
@@ -22,7 +22,7 @@
TC400M_VERSION:=MR5.6
VPMADT032_VERSION:=1.07
-FIRMWARE_URL:=http://ftp.digium.com/pub/telephony/firmware/releases
+FIRMWARE_URL:=http://downloads.digium.com/pub/telephony/firmware/releases
# Firmware files should use the naming convention: zaptel-fw-<base name>-<sub name>-<version> or zaptel-fw-<base name>-<version>
# First example: zaptel-fw-oct6114-064-1.05.01
Modified: team/tzafrir/sysfs/fxotune.c
URL: http://svn.digium.com/view/zaptel/team/tzafrir/sysfs/fxotune.c?view=diff&rev=2933&r1=2932&r2=2933
==============================================================================
--- team/tzafrir/sysfs/fxotune.c (original)
+++ team/tzafrir/sysfs/fxotune.c Wed Aug 22 00:51:37 2007
@@ -824,10 +824,10 @@
char zapdev[80] = "";
struct wctdm_echo_coefs coefs;
- configfd = open(configfile, O_CREAT|O_TRUNC|O_WRONLY);
+ configfd = open(configfile, O_CREAT|O_TRUNC|O_WRONLY, 0666);
if (configfd < 0) {
- fprintf(stderr, "open: %s\n", strerror(errno));
+ fprintf(stderr, "Cannot generate config file %s: open: %s\n", configfile, strerror(errno));
return -1;
}
Modified: team/tzafrir/sysfs/makeopts.in
URL: http://svn.digium.com/view/zaptel/team/tzafrir/sysfs/makeopts.in?view=diff&rev=2933&r1=2932&r2=2933
==============================================================================
--- team/tzafrir/sysfs/makeopts.in (original)
+++ team/tzafrir/sysfs/makeopts.in Wed Aug 22 00:51:37 2007
@@ -1,5 +1,7 @@
CC=@CC@
HOSTCC=@HOSTCC@
+CFLAGS=@CFLAGS@
+LDFLAGS=@LDFLAGS@
INSTALL=@INSTALL@
GREP=@GREP@
Modified: team/tzafrir/sysfs/wctdm24xxp/GpakApi.c
URL: http://svn.digium.com/view/zaptel/team/tzafrir/sysfs/wctdm24xxp/GpakApi.c?view=diff&rev=2933&r1=2932&r2=2933
==============================================================================
--- team/tzafrir/sysfs/wctdm24xxp/GpakApi.c (original)
+++ team/tzafrir/sysfs/wctdm24xxp/GpakApi.c Wed Aug 22 00:51:37 2007
@@ -106,10 +106,12 @@
DSP_ADDRESS IfBlockPntr; /* Interface Block pointer */
DSP_WORD DspStatus; /* DSP Status */
DSP_WORD DspChannels; /* number of DSP channels */
+ DSP_WORD Temp[2];
+#if 0
DSP_WORD DspConfs; /* number of DSP conferences */
DSP_ADDRESS PktBufrMem; /* address of Packet Buffer */
- DSP_WORD Temp[2];
unsigned short int i; /* loop index / counter */
+#endif
/* Read the pointer to the Interface Block. */
gpakReadDspMemory(DspId, DSP_IFBLK_ADDRESS, 2, Temp);
@@ -867,7 +869,9 @@
DSP_WORD TakeIndex; /* event fifo take index */
DSP_WORD WordsReady; /* number words ready for read out of event fifo */
DSP_WORD EventError; /* flag indicating error with event fifo msg */
+#if 0
DSP_WORD *pDebugData; /* debug data buffer pointer in event data struct */
+#endif
/* Make sure the DSP Id is valid. */
if (DspId >= MAX_DSP_CORES) {
Modified: team/tzafrir/sysfs/wctdm24xxp/GpakCust.c
URL: http://svn.digium.com/view/zaptel/team/tzafrir/sysfs/wctdm24xxp/GpakCust.c?view=diff&rev=2933&r1=2932&r2=2933
==============================================================================
--- team/tzafrir/sysfs/wctdm24xxp/GpakCust.c (original)
+++ team/tzafrir/sysfs/wctdm24xxp/GpakCust.c Wed Aug 22 00:51:37 2007
@@ -368,6 +368,7 @@
unsigned int NumBytes /* number of bytes to read */
)
{
+#ifdef VPM150M_SUPPORT
struct wctdm_firmware *fw = FileId;
unsigned int i, count;
@@ -385,4 +386,5 @@
fw->offset += count;
return count;
-}
+#endif
+}
Modified: team/tzafrir/sysfs/wctdm24xxp/GpakCust.h
URL: http://svn.digium.com/view/zaptel/team/tzafrir/sysfs/wctdm24xxp/GpakCust.h?view=diff&rev=2933&r1=2932&r2=2933
==============================================================================
--- team/tzafrir/sysfs/wctdm24xxp/GpakCust.h (original)
+++ team/tzafrir/sysfs/wctdm24xxp/GpakCust.h Wed Aug 22 00:51:37 2007
@@ -21,7 +21,9 @@
#define _GPAKCUST_H
#include "wctdm24xxp.h"
+#ifdef VPM150M_SUPPORT
#include <linux/firmware.h>
+#endif
#include "gpakenum.h"
Modified: team/tzafrir/sysfs/wctdm24xxp/base.c
URL: http://svn.digium.com/view/zaptel/team/tzafrir/sysfs/wctdm24xxp/base.c?view=diff&rev=2933&r1=2932&r2=2933
==============================================================================
--- team/tzafrir/sysfs/wctdm24xxp/base.c (original)
+++ team/tzafrir/sysfs/wctdm24xxp/base.c Wed Aug 22 00:51:37 2007
@@ -42,7 +42,9 @@
#include <linux/errno.h>
#include <linux/pci.h>
#include <linux/interrupt.h>
+#ifdef VPM150M_SUPPORT
#include <linux/firmware.h>
+#endif
#include <linux/workqueue.h>
#include <linux/delay.h>
#include <asm/semaphore.h>
@@ -460,6 +462,7 @@
}
}
+#ifdef VPM150M_SUPPORT
/* Add our leds in */
for (x = 24; x < 28; x++)
writechunk[CMD_BYTE(x, 0, 0)] |= leds;
@@ -467,6 +470,7 @@
/* Now let's figure out if we need to check for DTMF */
if (test_bit(VPM150M_ACTIVE, &vpm150m->control) && !whichframe && !(wc->intcount % 100))
queue_work(vpm150m->wq, &vpm150m->work);
+#endif
spin_unlock_irqrestore(&wc->reglock, flags);
}
@@ -1501,6 +1505,7 @@
wctdm_vpm_out(wc,unit,channel,0x01);
return 0;
+#ifdef VPM150M_SUPPORT
} else if (wc->vpm150m) {
struct vpm150m *vpm150m = wc->vpm150m;
@@ -1514,6 +1519,7 @@
queue_work(vpm150m->wq, &vpm150m->work);
}
return 0;
+#endif
} else
return -ENODEV;
}
@@ -1671,6 +1677,15 @@
wctdm_setctl(wc, 0x0008, 0x00000000);
#endif
}
+
+ if (ints & 0x0000a3ae) {
+ /* This will allow us to recover if interrupts are held for a long period of time */
+ if (debug & DEBUG_CARD)
+ printk("Abnormal interrupt %08x detected\n", ints);
+ wctdm_setctl(wc, 0x0008, 0x00000000);
+ wctdm_setctl(wc, 0x0010, 0x00000000);
+ }
+
#ifdef LINUX26
return IRQ_RETVAL(1);
#endif
@@ -2034,15 +2049,6 @@
(wctdm_getreg(wc, card, 13) >> 2) & 0xf);
/* Enable on-hook line monitor */
wctdm_setreg(wc, card, 5, 0x08);
-
- /* Apply negative Tx gain of 4.5db to DAA */
- wctdm_setreg(wc, card, 38, 0x14); /* 4db */
- wctdm_setreg(wc, card, 40, 0x15); /* 0.5db */
-
- /* Apply negative Rx gain of 4.5db to DAA */
- wctdm_setreg(wc, card, 39, 0x14); /* 4db */
- wctdm_setreg(wc, card, 41, 0x15); /* 0.5db */
-
/* Take values for fxotxgain and fxorxgain and apply them to module */
if (fxotxgain) {
@@ -3060,6 +3066,7 @@
newjiffies = jiffies + HZ/10;
while(((reg = wctdm_getctl(wc,0x0000)) & 0x00000001) && (newjiffies > jiffies));
printk("%s: New Reg: %08x!\n", wc->variety, reg);
+ wctdm_setctl(wc, 0x0000, 0xfffa0000);
/* Configure watchdogs, access, etc */
@@ -3149,6 +3156,9 @@
}
#ifdef VPM_SUPPORT
+
+#ifdef VPM150M_SUPPORT
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
static void vpm150m_bh(void *data)
{
@@ -3493,16 +3503,20 @@
return 0;
}
+#endif /* VPM150M_SUPPORT */
static void wctdm_vpm150m_init(struct wctdm *wc)
{
unsigned short i;
struct vpm150m *vpm150m;
[... 3465 lines stripped ...]
More information about the zaptel-commits
mailing list